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

@@ -395,6 +395,36 @@ fun getModelConfig(type: Int): OnlineModelConfig? {
)
}
17 -> {
val modelDir = "sherpa-onnx-streaming-zipformer-ctc-zh-int8-2025-06-30"
return OnlineModelConfig(
zipformer2Ctc = OnlineZipformer2CtcModelConfig(
model = "$modelDir/model.int8.onnx",
),
tokens = "$modelDir/tokens.txt",
)
}
18 -> {
val modelDir = "sherpa-onnx-streaming-zipformer-ctc-zh-2025-06-30"
return OnlineModelConfig(
zipformer2Ctc = OnlineZipformer2CtcModelConfig(
model = "$modelDir/model.onnx",
),
tokens = "$modelDir/tokens.txt",
)
}
19 -> {
val modelDir = "sherpa-onnx-streaming-zipformer-ctc-zh-fp16-2025-06-30"
return OnlineModelConfig(
zipformer2Ctc = OnlineZipformer2CtcModelConfig(
model = "$modelDir/model.fp16.onnx",
),
tokens = "$modelDir/tokens.txt",
)
}
1000 -> {
val modelDir = "sherpa-onnx-rk3588-streaming-zipformer-bilingual-zh-en-2023-02-20"
return OnlineModelConfig(