--- license: apache-2.0 language: - multilingual tags: - whisper - automatic-speech-recognition - asr - speech - onnx - onnxruntime - sherpa-onnx - soniqo base_model: openai/whisper-medium library_name: onnxruntime pipeline_tag: automatic-speech-recognition --- # Whisper Medium - ONNX Official OpenAI Whisper medium checkpoint exported as ONNX encoder/decoder graphs for `speech-core` and sherpa-onnx-compatible runtimes. > Part of the [soniqo.audio](https://soniqo.audio) speech toolkit. This is the ONNX Runtime bundle used by `speech-core` for server, desktop, and Android-style runtimes; the graphs remain sherpa-onnx compatible. Browse ONNX bundles in the [soniqo ONNX collection](https://huggingface.co/collections/soniqo/onnx-6a1c0ae64587a78f8e8b9b96). ## Model | | | |---|---| | Source | [openai/whisper-medium](https://huggingface.co/openai/whisper-medium) | | Export format | ONNX for sherpa-onnx | | Variants | FP32, INT8, FP16 | | Runtime | speech-core `OnnxWhisperStt` / ONNX Runtime; sherpa-onnx compatible | | Total artifact size | 5277.42 MiB | The FP16 graphs use external `*.onnx.data` files. Large-style bundles also use external FP32 `*.weights` files. Keep external-data files beside their matching `.onnx` files. ## Files | File | Size | Description | |---|---:|---| | `medium-decoder.fp16.onnx` | 1.62 MB | Whisper decoder graph | | `medium-decoder.fp16.onnx.data` | 774.93 MB | External tensor data for the adjacent ONNX graph | | `medium-decoder.int8.onnx` | 544.56 MB | Whisper decoder graph | | `medium-decoder.onnx` | 1551.82 MB | Whisper decoder graph | | `medium-encoder.fp16.onnx` | 0.44 MB | Whisper encoder graph | | `medium-encoder.fp16.onnx.data` | 682.02 MB | External tensor data for the adjacent ONNX graph | | `medium-encoder.int8.onnx` | 356.81 MB | Whisper encoder graph | | `medium-encoder.onnx` | 1364.44 MB | Whisper encoder graph | | `medium-tokens.txt` | 0.78 MB | Tokenizer tokens for speech-core and sherpa-onnx-compatible runtimes | ## Usage Use with [speech-core](https://github.com/soniqo/speech-core)'s native ONNX Whisper runtime: ```cpp #include speech_core::OnnxWhisperStt stt( "medium-encoder.int8.onnx", "medium-decoder.int8.onnx", "medium-tokens.txt"); auto result = stt.transcribe(audio, length, 16000); ``` The same encoder/decoder/token files can also be loaded by sherpa-onnx: ```python import sherpa_onnx recognizer = sherpa_onnx.OfflineRecognizer.from_whisper( encoder="medium-encoder.fp16.onnx", decoder="medium-decoder.fp16.onnx", tokens="medium-tokens.txt", language="en", task="transcribe", provider="cpu", ) ``` ## Benchmarks This repository ships the exported model artifacts. Full published WER/RTF is currently available for the turbo bundle; run the benchmark command above for local numbers on this variant. ## Links - Website: [soniqo.audio](https://soniqo.audio) - Speech Core: [github.com/soniqo/speech-core](https://github.com/soniqo/speech-core) - Docs: [soniqo.audio/speech-core](https://soniqo.audio/speech-core) - Blog: [soniqo.audio/blog](https://soniqo.audio/blog)