Add Python API (#31)

This commit is contained in:
Fangjun Kuang
2023-02-19 19:36:03 +08:00
committed by GitHub
parent 8acc059b3f
commit ea09d5fbc5
51 changed files with 967 additions and 57 deletions

View File

@@ -1,6 +1,6 @@
include_directories(${CMAKE_SOURCE_DIR})
add_executable(sherpa-onnx
add_library(sherpa-onnx-core
features.cc
online-lstm-transducer-model.cc
online-recognizer.cc
@@ -9,15 +9,21 @@ add_executable(sherpa-onnx
online-transducer-model-config.cc
online-transducer-model.cc
onnx-utils.cc
sherpa-onnx.cc
symbol-table.cc
wave-reader.cc
)
target_link_libraries(sherpa-onnx
target_link_libraries(sherpa-onnx-core
onnxruntime
kaldi-native-fbank-core
)
add_executable(sherpa-onnx-show-info show-onnx-info.cc)
target_link_libraries(sherpa-onnx-show-info onnxruntime)
add_executable(sherpa-onnx sherpa-onnx.cc)
target_link_libraries(sherpa-onnx sherpa-onnx-core)
if(NOT WIN32)
target_link_libraries(sherpa-onnx "-Wl,-rpath,${SHERPA_ONNX_RPATH_ORIGIN}/../lib")
endif()
install(TARGETS sherpa-onnx-core DESTINATION lib)
install(TARGETS sherpa-onnx DESTINATION bin)