vertexvoice-indic / README.md
nmukthap's picture
Nine per-language IndicConformer packs (int8, external data)
10c4d4b verified
|
Raw
History Blame Contribute Delete
2.11 kB
---
license: apache-2.0
language: [hi, ta, te, bn, mr, pa, gu, kn, ml]
tags: [automatic-speech-recognition, onnx, indicconformer, quantized]
---
# IndicConformer per-language ONNX packs (int8, external data)
Nine per-language speech-recognition packs for the Indian languages, prepared for
on-device use: **131 MB each**, against 622 MB for the 22-language multilingual
model they replace.
Derived from [AI4Bharat IndicConformer](https://huggingface.co/ai4bharat) via the
ONNX exports published by
[OpenVoiceOS](https://huggingface.co/OpenVoiceOS). Two changes were applied to
each, both necessary to run on ONNX Runtime's CPU provider on a phone:
1. **Re-quantized from QInt8 to QUInt8.** The upstream `model.int8.onnx` fails to
create a session with `Could not find an implementation for ConvInteger(10)`:
ORT's CPU `ConvInteger` kernel is uint8-only, and a Conformer's pre-encode is
convolutional. The fp32 model was quantized here instead.
2. **Initializers moved to an external file.** The single-file build copies its
weights into the arena — 202 MiB resident on an iPhone. As mapped external
data that is ~30 MiB, because the pages stay clean and file-backed.
Each pack is `model.int8.opt.onnx` (graph) + `model.int8.opt.onnx.data` (weights)
+ `vocab.txt`, plus the filterbank and window the featurizer needs
(`mel_filters.json`, `hanning_window.json`), which the upstream exports do not
include.
## Shape
Single fused graph — the CTC output is already the language's own vocabulary, so
no column masking is needed:
```
audio_signal [batch, 80, frames] + length [batch] -> logprobs [batch, frames, vocab]
```
80 log-mel filters at 16 kHz, subsampling factor 4. `<blk>` is the last vocabulary
entry.
## Accuracy
Measured on one held-out clip per language (61 words total): **80.3% exact word
match**, against 86.9% for the 22-language model on the same clips. Smaller and
several times faster, for a few points of accuracy.
| te | bn | pa | gu | kn | hi | mr | ml | ta |
|---|---|---|---|---|---|---|---|---|
| 6/6 | 6/6 | 7/9 | 6/7 | 5/6 | 5/7 | 5/7 | 5/7 | 4/6 |