This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex-mr_series-sherpa-onnx/sherpa-onnx/python/tests/CMakeLists.txt
Wei Kang 734bbd91dc Add Python API for keyword spotting (#576)
* Add alsa & microphone support for keyword spotting

* Add python wrapper
2024-03-01 09:31:11 +08:00

35 lines
887 B
CMake

function(sherpa_onnx_add_py_test source)
get_filename_component(name ${source} NAME_WE)
set(name "${name}_py")
add_test(NAME ${name}
COMMAND
"${PYTHON_EXECUTABLE}"
"${CMAKE_CURRENT_SOURCE_DIR}/${source}"
WORKING_DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}
)
get_filename_component(sherpa_onnx_path ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)
set_property(TEST ${name}
PROPERTY ENVIRONMENT "PYTHONPATH=${sherpa_onnx_path}:$<TARGET_FILE_DIR:_sherpa_onnx>:$ENV{PYTHONPATH}"
)
endfunction()
# please sort the files in alphabetic order
set(py_test_files
test_feature_extractor_config.py
test_keyword_spotter.py
test_offline_recognizer.py
test_online_recognizer.py
test_online_transducer_model_config.py
test_speaker_recognition.py
test_text2token.py
)
foreach(source IN LISTS py_test_files)
sherpa_onnx_add_py_test(${source})
endforeach()