Downloads · 30 days
20
34% of all-time downloads
OpenVoiceOS/w2v-bert-2.0-kinyarwanda-onnx
w2v-bert-2.0-kinyarwanda-onnx is a automatic speech recognition model from OpenVoiceOS. Use it when you need speech turned into text. The card lists the license as cc-by-4.0.
ONNX export of badrex/w2v-bert-2.0-kinyarwanda-asr for use with onnx-asr.
Downloads · 30 days
20
34% of all-time downloads
All-time downloads
58
Public
Repo size
2.9 GB
Likes
0
Public
Click a slice to open those files.
.onnx_data2.3 GB · 80%
From the Hugging Face model README
ONNX export of badrex/w2v-bert-2.0-kinyarwanda-asr
for use with onnx-asr.
This is the 1st-place solution of the "Kinyarwanda Automatic Speech Recognition — Track A" Kaggle competition, published by Badr M. Abdullah / the ASRwanda team and Digital Umuganda. See the writeup: ASRwanda: 1st place solution for Kinyarwanda ASR Track A.
Kinyarwanda has roughly 15 million speakers. This is the first specialized Kinyarwanda model in the OpenVoiceOS onnx-asr collection.
facebook/w2v-bert-2.0 (Meta).The source model is a Wav2Vec2BertForCTC (Wav2Vec2-BERT 2.0 conformer encoder + CTC head,
add_adapter: false, i.e. no additional temporal downsampling beyond the feature frontend).
Its feature frontend is transformers.SeamlessM4TFeatureExtractor: Kaldi-style log-mel
filterbanks (Povey window) with per-utterance mean/variance normalization and 2-frame
stacking into 160-dim vectors. This is exactly what onnx-asr's w2vbert NumPy preprocessor
(W2vBertPreprocessorNumpy) reproduces — verified elsewhere in this collection to ~6e-05
max abs error against the reference feature extractor. So the encoder + CTC head was
exported as a single ONNX graph taking the already-stacked 160-dim features (not raw
waveform), matching the existing espnet-ctc model contract:
features (B, T, 160) f32, features_lens (B,) i64
-> logprobs (B, T', V) f32 (log_softmax), logprobs_lens (B,) i64
Loads with:
import onnx_asr
model = onnx_asr.load_model("espnet-ctc", "OpenVoiceOS/w2v-bert-2.0-kinyarwanda-onnx")
(on the feat/espnet-ebranchformer-ctc integration branch of the OpenVoiceOS onnx-asr fork
until it lands on dev.)
Subsampling factor: 1 — measured empirically (output frame count equals input feature
frame count for several lengths), consistent with add_adapter: false in the source config:
the conformer encoder does no extra temporal downsampling beyond the preprocessor's own
2x frame-stacking, so the CTC output rate is one frame per stacked (20ms) feature frame.
model.onnx (+ model.onnx_data) — fp32 graph, ~2.2GB weights.model.int8.onnx — dynamic-range int8 quantized weights.vocab.txt — 32-token char vocabulary (kaldi-style token id lines), blank kept at its
trained index (<blk> = index 29, the original [PAD] token id).config.json — {"model_type": "espnet-ctc", "subsampling_factor": 1}.Verified against 3 real Kinyarwanda clips from KYAGABA/kinyarwanda_cleaned_testset_verified
(FLEURS has no Kinyarwanda config; Common Voice rw config was not resolvable via the
datasets library at test time, so this verified test set was used instead).
onnx_asr.load_model("espnet-ctc", ...)) output is identical to the native
transformers.Wav2Vec2BertForCTC greedy-CTC decode on all 3 clips (byte-for-byte on 2/3;
one clip differs only by a collapsed double space) — confirms the ONNX export and the
w2vbert preprocessor reproduce the reference model exactly.RTF (real-time factor, CPU, OMP_NUM_THREADS=6, on a shared/contended host — treat as
upper bounds, not clean single-tenant numbers):
| variant | avg RTF (3 clips) |
|---|---|
| native transformers fp32 | ~7.0 (noisy, one contended outlier at 19.4) |
| onnx-asr fp32 | ~2.2 |
| onnx-asr int8 | ~1.35 |
ONNX is consistently faster than native transformers under the same contention, and int8 is faster again than fp32.