Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support streaming paraformer #263

Merged
merged 11 commits into from
Aug 14, 2023
Merged

Conversation

csukuangfj
Copy link
Collaborator

@csukuangfj csukuangfj commented Aug 12, 2023

TODOs

  • Update C API
  • Update C# API
  • Update Go API
  • Update jni
  • Update Swift API

@csukuangfj csukuangfj changed the title WIP: Begin to add streaming paraformer Support streaming paraformer Aug 14, 2023
@csukuangfj
Copy link
Collaborator Author

csukuangfj commented Aug 14, 2023

Usage of this pull-request

Download the pre-trained model

cd /path/to/sherpa-onnx

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 ..

Decode files with C++ binaries

./build/bin/sherpa-onnx \
  --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 \
  ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/test_wavs/0.wav \
  ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/test_wavs/1.wav

You can also use other scripts for streaming models in sherpa-onnx.

@csukuangfj csukuangfj merged commit 6038e2a into k2-fsa:master Aug 14, 2023
132 of 142 checks passed
@csukuangfj csukuangfj deleted the online-pararformer branch August 14, 2023 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant