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

Add C++ and Python API for FireRedASR AED models #1867

Merged
merged 4 commits into from
Feb 16, 2025

Conversation

csukuangfj
Copy link
Collaborator

Usage

  1. Build sherpa-onnx from source
  2. Download a model
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16.tar.bz2
tar xvf sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16.tar.bz2
rm sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16.tar.bz2
  1. Run it with a binary compiled from C++
./build/bin/sherpa-onnx-offline \
  --fire-red-asr-encoder=./sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16/encoder.int8.onnx \
  --fire-red-asr-decoder=./sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16/decoder.int8.onnx \
  --tokens=./sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16/tokens.txt \
  ./sherpa-onnx-fire-red-asr-large-zh_en-2025-02-16/test_wavs/0.wav
  1. Run it with Python API
 python3 ./python-api-examples/offline-fire-red-asr-decode-files.py

Huggingface spaces

You can try the model by visiting
https://huggingface.co/spaces/k2-fsa/automatic-speech-recognition

Screenshot 2025-02-16 at 22 39 21

国内用户,可以访问下面的huggingface space 镜像
https://hf.qhduan.com/spaces/k2-fsa/automatic-speech-recognition
Screenshot 2025-02-16 at 22 40 10


CC @FireRedTeam @kaituoxu

@csukuangfj csukuangfj merged commit 316424b into k2-fsa:master Feb 16, 2025
58 of 78 checks passed
@csukuangfj csukuangfj deleted the cpp-fire-red-asr branch February 16, 2025 14:45
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