Add C++ API for streaming ASR. (#1455)

It is a wrapper around the C API.
This commit is contained in:
Fangjun Kuang
2024-10-23 12:07:43 +08:00
committed by GitHub
parent 3edd8d7cf6
commit effd5ef2be
72 changed files with 729 additions and 83 deletions

21
.github/scripts/test-cxx-api.sh vendored Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -ex
log() {
# This function is from espnet
local fname=${BASH_SOURCE[1]##*/}
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
}
echo "CXX_STREAMING_ZIPFORMER_EXE is $CXX_STREAMING_ZIPFORMER_EXE"
echo "PATH: $PATH"
log "------------------------------------------------------------"
log "Test streaming zipformer CXX API"
log "------------------------------------------------------------"
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
tar xvf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
rm sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20.tar.bz2
$CXX_STREAMING_ZIPFORMER_EXE
rm -rf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20