Fix C api for Go and MFC to support streaming paraformer (#268)

This commit is contained in:
Fangjun Kuang
2023-08-14 17:02:23 +08:00
committed by GitHub
parent eb5ae18015
commit bc791d4996
13 changed files with 315 additions and 74 deletions

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# Please refer to
# https://k2-fsa.github.io/sherpa/onnx/pretrained_models/online-paraformer/paraformer-models.html#csukuangfj-sherpa-onnx-streaming-paraformer-bilingual-zh-en-chinese-english
# to download the model files
if [ ! -d ./sherpa-onnx-streaming-paraformer-bilingual-zh-en ]; then
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
cd sherpa-onnx-streaming-paraformer-bilingual-zh-en
git lfs pull --include "*.onnx"
cd ..
fi
./streaming-decode-files \
--paraformer-encoder ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/encoder.int8.onnx \
--paraformer-decoder ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/decoder.int8.onnx \
--tokens ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/tokens.txt \
--decoding-method greedy_search \
--model-type paraformer \
--debug 0 \
./sherpa-onnx-streaming-paraformer-bilingual-zh-en/test_wavs/0.wav