Skip to content

Add C++ runtime for parakeet-tdt-0.6b-v2. #2181

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

csukuangfj
Copy link
Collaborator

See also #2180

Usage

  1. Build sherpa-onnx
  2. Download a model from https://github.com/k2-fsa/sherpa-onnx/releases/tag/asr-models
    For example
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8.tar.bz2

tar xvf sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8.tar.bz2
  1. Run it
./build/bin/sherpa-onnx-offline \
  --encoder=./sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8/encoder.int8.onnx \
  --decoder=./sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8/decoder.int8.onnx \
  --joiner=./sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8/joiner.int8.onnx \
  --tokens=./sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8/tokens.txt \
  --model-type=nemo_transducer \
  ./sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8/test_wavs/0.wav

The output on my mac is

Screenshot 2025-05-06 at 16 47 26

Info about my mac
Screenshot 2025-05-06 at 16 57 17


CC @hainan-xv

@csukuangfj csukuangfj merged commit f00066d into k2-fsa:master May 6, 2025
18 of 218 checks passed
@csukuangfj csukuangfj deleted the nemo-parakeet-tdt-0.6b-cpp branch May 6, 2025 08:59
@csukuangfj csukuangfj restored the nemo-parakeet-tdt-0.6b-cpp branch May 6, 2025 09:01
@csukuangfj
Copy link
Collaborator Author

You can try it by visiting our huggingface space
https://huggingface.co/spaces/k2-fsa/automatic-speech-recognition

(For Chinese users, you can also use the mirror
https://hf.qhduan.com/spaces/k2-fsa/automatic-speech-recognition
)

Screenshot 2025-05-06 at 17 25 53

@csukuangfj
Copy link
Collaborator Author

Here is the RTF test on my orangpi5 max, which uses rk3588.
It has 4 cortex A76 CPUs and 4 cortex A55 CPUs.

RTF on 1 cortex A76 CPU

Screenshot 2025-05-06 at 17 42 17

RTF on 1 cortex A55 CPU

Screenshot 2025-05-06 at 17 43 15

Info about the board

Screenshot 2025-05-06 at 17 44 07

@csukuangfj csukuangfj deleted the nemo-parakeet-tdt-0.6b-cpp branch May 7, 2025 07:44
@csukuangfj
Copy link
Collaborator Author

We have provided an Android APK to try this model.

Please see
https://k2-fsa.github.io/sherpa/onnx/vad/apk-asr.html

Screenshot 2025-05-07 at 15 52 00

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