Views
No views yet
google/medasr model converted to ONNX format for on-device inference using sherpa-onnx in the Android application.k2-fsa/sherpa-onnx project scripts.google/medasr model (you must accept the license agreement on the model card).1# Clone sherpa-onnx
2git clone https://github.com/k2-fsa/sherpa-onnx.git
3cd sherpa-onnx
4# Checkout the specific commit that was used for the conversion
5git checkout bb49014c4e5dfbd60a58d1a0a7ad351883eebf40
6cd scripts/medasr
7
8# Setup environment & Convert
9uv venv --python 3.12
10source .venv/bin/activate
11uv pip install accelerate bitsandbytes librosa onnx==1.17.0 onnxruntime==1.17.1 onnxscript "numpy<2" kaldi-native-fbank "git+https://github.com/huggingface/transformers.git@65dc261512cbdb1ee72b88ae5b222f2605aad8e5"
12
13# Export the model
14python export_onnx.pymodel.int8.onnx and tokens.txt files, which are used directly for on-device Automatic Speech Recognition in MedGem.