ONNX export of felerminoali/omniASR-CTC-1B-v2-emakhuwa,
a Emakhuwa fine-tune of Meta's omniASR_CTC_1B_v2, for in-browser transcription with onnxruntime-web
(used by CATfrica for vmw-MZ recordings).
| File | Description |
|---|---|
model_quantized.onnx |
Dynamic int8 (MatMul weights), opset 17, ~1 GB |
vocab.json |
CTC vocabulary (SentencePiece pieces; id 0 <s> is the blank) |
config.json, preprocessor_config.json |
Equivalent Wav2Vec2ForCTC configuration |
Input: input_values float32 [batch, samples], 16 kHz mono, zero-mean / unit-variance normalized.
Output: logits [batch, frames, 10288], one frame per 20 ms. Decode with greedy CTC
(collapse repeats, drop blank), ▁/space starts a new word.
Original fairseq2 model (test set): WER 15.21%, CER 2.50%. ONNX int8 vs fp32 ONNX: 0.66% CER difference on sample speech; fp32 ONNX matches PyTorch logits (max diff 6e-4).
The int8 model is intended for CPU/WebAssembly; expect slower than real time on single-threaded wasm.
convert_omniasr_onnx.py in this repo rebuilds these files from the source model:
HF_TOKEN=hf_... python convert_omniasr_onnx.py out --model felerminoali/omniASR-CTC-1B-v2-emakhuwa --push-to-hub felerminoali/omniASR-CTC-1B-v2-emakhuwa-onnx
It maps the fairseq2 checkpoint to Wav2Vec2ForCTC, exports fp32 ONNX (opset 17), checks it against PyTorch, then quantizes it to dynamic int8 (QUInt8, MatMul weights) with onnxruntime. Requirements are in the script docstring.