Whisper Hinglish for sherpa-onnx (int8)
Trelis/whisper-hinglish-preview converted to ONNX for sherpa-onnx and quantized to int8, so it can run on a phone.
The model writes Hindi–English code-mixed speech (Hinglish) in Devanagari, and keeps English words and sentences in English.
Files
| File | Size | sha256 |
|---|---|---|
encoder.int8.onnx |
766,590,125 bytes | efe2b26b667cb62b165eac420f029fe2b0c63a4801f7ae548d9401755e307408 |
decoder.int8.onnx |
1,008,201,478 bytes | b92bf6d132043d07ce147d44bebd75be0ec8f483eb665c2bfb0b52b58ef11a30 |
tokens.txt |
816,730 bytes | b34b360dbb493e781e479794586d661700670d65564001f23024971d1f2fa126 |
tokens.txt is the standard Whisper large-v3 vocabulary, the same file that sherpa-onnx's Whisper turbo uses.
How it was converted
- Source:
Trelis/whisper-hinglish-previewat revisioneab1188fd2d0e91f2584229b32b3bfe1901c896c. - The Hugging Face weights were mapped to OpenAI Whisper's layout and exported with sherpa-onnx's Whisper export script (TorchScript ONNX exporter, external data, then dynamic int8 quantization).
- The model's
<|mixedcode|>token (id 51866) is written into the encoder'ssot_sequencemetadata, so sherpa-onnx starts every decode the way the fine-tune was trained, with no code change in sherpa-onnx.
Use with sherpa-onnx
import sherpa_onnx
recognizer = sherpa_onnx.OfflineRecognizer.from_whisper(
encoder="encoder.int8.onnx",
decoder="decoder.int8.onnx",
tokens="tokens.txt",
language="hi",
task="transcribe",
)
It is a large-v3-sized model. It needs about 2 GB of memory to load, and it runs slower than real time on most phones, so it suits transcribing after a recording rather than live.
Licence and credit
Apache-2.0, the licence of the model it is converted from. All the credit for the model goes to its authors:
- Trelis Research, for the Hinglish fine-tune
Trelis/whisper-hinglish-preview(Apache-2.0). - ARTPARK-IISc, for
whisper-large-v3-vaani-hindi, which it builds on (Apache-2.0). - OpenAI, for Whisper large-v3 (Apache-2.0).
This repository only changes the format (ONNX, int8). It is not affiliated with or endorsed by the authors. Used by the MinutIQ app for its optional "Best" transcription quality.