onnx-asr
Collection
ASR models supported by onnx-asr
โข
8 items
โข
Updated
OpenAI Whisper base model converted to ONNX format for onnx-asr.
Install onnx-asr
pip install onnx-asr[cpu,hub]
Load whisper-base model and recognize wav file
import onnx_asr
model = onnx_asr.load_model("whisper-base")
print(model.recognize("test.wav"))
Read onnxruntime instruction for convert Whisper to ONNX.
Download model and export with Beam Search and Forced Decoder Input Ids:
python3 -m onnxruntime.transformers.models.whisper.convert_to_onnx -m openai/whisper-base --output ./whisper-onnx --use_forced_decoder_ids --optimize_onnx --precision fp32
Save tokenizer config
from transformers import WhisperTokenizer
processor = WhisperTokenizer.from_pretrained("openai/whisper-base")
processor.save_pretrained("whisper-onnx")
Base model
openai/whisper-base