Add a C++ example to show streaming VAD + non-streaming ASR. (#420)

This commit is contained in:
Fangjun Kuang
2023-11-11 22:54:27 +08:00
committed by GitHub
parent 3c1ea990b1
commit 68f0e59688
5 changed files with 208 additions and 1 deletions

View File

@@ -225,6 +225,11 @@ if(SHERPA_ONNX_ENABLE_PORTAUDIO)
microphone.cc
)
add_executable(sherpa-onnx-vad-microphone-offline-asr
sherpa-onnx-vad-microphone-offline-asr.cc
microphone.cc
)
if(BUILD_SHARED_LIBS)
set(PA_LIB portaudio)
else()
@@ -235,6 +240,7 @@ if(SHERPA_ONNX_ENABLE_PORTAUDIO)
sherpa-onnx-microphone
sherpa-onnx-microphone-offline
sherpa-onnx-vad-microphone
sherpa-onnx-vad-microphone-offline-asr
)
foreach(exe IN LISTS exes)
target_link_libraries(${exe} ${PA_LIB} sherpa-onnx-core)