Fix VAD+ASR C++ example. (#2335)

It was not able to handle short audios., e.g., 2.1 seconds.
This commit is contained in:
Fangjun Kuang
2025-07-02 15:52:49 +08:00
committed by GitHub
parent ea3e583ac9
commit 9fe25cc06f
3 changed files with 96 additions and 4 deletions

View File

@@ -300,6 +300,66 @@ def get_models():
ls -lh
popd
""",
),
Model(
model_name="sherpa-onnx-streaming-zipformer-ctc-zh-int8-2025-06-30",
idx=17,
lang="zh",
short_name="large_zipformer_int8",
rule_fsts="itn_zh_number.fst",
cmd="""
if [ ! -f itn_zh_number.fst ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/itn_zh_number.fst
fi
pushd $model_name
rm -fv bpe.model
rm -rf test_wavs
ls -lh
popd
""",
),
Model(
model_name="sherpa-onnx-streaming-zipformer-ctc-zh-2025-06-30",
idx=18,
lang="zh",
short_name="large_zipformer",
rule_fsts="itn_zh_number.fst",
cmd="""
if [ ! -f itn_zh_number.fst ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/itn_zh_number.fst
fi
pushd $model_name
rm -fv bpe.model
rm -rf test_wavs
ls -lh
popd
""",
),
Model(
model_name="sherpa-onnx-streaming-zipformer-ctc-fp16-zh-2025-06-30",
idx=19,
lang="zh",
short_name="large_zipformer_fp16",
rule_fsts="itn_zh_number.fst",
cmd="""
if [ ! -f itn_zh_number.fst ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/itn_zh_number.fst
fi
pushd $model_name
rm -fv bpe.model
rm -rf test_wavs
ls -lh
popd
""",
),