File size: 13,069 Bytes
7f49add
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# Dhvani-ASR: technical details

The full evaluation, method and training record behind the [model card](README.md).

## Using it from Python

```python
from nemo.collections.asr.models import EncDecHybridRNNTCTCBPEModel
from language_branches import load_branch, set_language

model = EncDecHybridRNNTCTCBPEModel.restore_from("Dhvani-ASR.nemo").eval()
for path in ["branches/branch-en.pt", "branches/branch-ta.pt"]:
    load_branch(model, path)
model.eval()

set_language(model, "en")      # routes through the English branch; a language without one uses the base
model.cur_decoder = "rnnt"
best, _ = model.transcribe(["speech.wav"], batch_size=1, language_id="en")   # RNN-T: (best, all)
print(best[0])
```

## Results

All numbers are greedy decoding, batch 1, scored on lowercased, punctuation-free text.
- **Samples, not full test sets:** each set is a seeded random sample of up to 200 clips per
  language, drawn from its test split (Kathbath has none, so its valid split). The exceptions are
  IndicVoices valid (2,845 clips over 22 languages, plus 253 LibriSpeech dev clips for `en`) and
  Common Voice South Asian English (1,000 clips). Differences of a fraction of a point, per
  language or between models, are within sampling noise.
- **Macro** is the unweighted mean over languages.
- **WER** uses a single reference, so every spelling variant counts as an error. This inflates
  Indic WER for every model, this one included.

### Release model vs base, macro over each test set

| Test set | Languages | Base (Indic only) | **This model (Indic)** | This model, all languages: WER / CER |
|---|---|---:|---:|---:|
| IndicVoices valid (conversational) | 22 + en | 0.2222 | 0.2219 | 0.2132 / 0.0747 |
| Kathbath valid (read) | 12 | 0.1608 | 0.1601 | 0.1601 / 0.0305 |
| FLEURS test (read, out of domain) | 13 + en | 0.1901 | 0.1891 | 0.1859 / 0.0610 |
| Vaani test (spontaneous) | 18 + en | 0.3560 | 0.3453 | 0.3321 / 0.1127 |

Every Indic difference comes from Tamil; the other 21 languages are byte-for-byte the base.

### English

| Test set | WER | CER |
|---|---:|---:|
| LibriSpeech test-clean | 0.038 | 0.013 |
| LibriSpeech dev | 0.021 | 0.009 |
| Vaani en (Indian, spontaneous) | 0.095 | 0.046 |
| Common Voice 26.0 South Asian English test (1,000 clips, unseen speakers) | 0.131 | 0.045 |
| FLEURS en | 0.143 | 0.079 |
| Svarah (Indian accent) | 0.180 | 0.106 |

These are 200-clip samples (Common Voice: 1,000). The comparison below uses different 100-clip
samples, so its numbers differ somewhat (for example Svarah 0.203, Vaani en 0.117).

**English-only models are far ahead.** On a 100-clip FLEURS sample, NVIDIA's Parakeet TDT 0.6B v2
scored 0.044 against our 0.139.

### Per language (WER)

| Lang | IndicVoices | Kathbath | FLEURS | Vaani | | Lang | IndicVoices | Kathbath | FLEURS | Vaani |
|---|---:|---:|---:|---:|---|---|---:|---:|---:|---:|
| en | 0.021 | – | 0.143 | 0.095 | | mni | 0.214 | – | – | 0.292 |
| as | 0.143 | – | 0.188 | 0.196 | | mr | 0.206 | 0.127 | 0.169 | 0.303 |
| bn | 0.112 | 0.108 | 0.148 | 0.257 | | ne | 0.080 | – | 0.232 | 0.338 |
| brx | 0.187 | – | – | – | | or | 0.307 | 0.163 | 0.213 | 0.444 |
| doi | 0.262 | – | – | – | | pa | 0.108 | 0.120 | 0.162 | 0.238 |
| gu | 0.170 | 0.131 | 0.173 | 0.212 | | sa | 0.213 | 0.209 | – | – |
| hi | 0.100 | 0.091 | 0.127 | 0.180 | | sat | 0.335 | – | – | 0.611 |
| kn | 0.385 | 0.143 | 0.189 | 0.402 | | sd | 0.251 | – | – | – |
| kok | 0.268 | – | – | 0.484 | | **ta** | 0.267 | 0.225 | 0.241 | 0.322 |
| ks | 0.309 | – | – | 0.590 | | te | 0.288 | 0.218 | 0.219 | 0.225 |
| mai | 0.275 | – | – | 0.391 | | ur | 0.093 | 0.112 | 0.154 | 0.400 |
| ml | 0.310 | 0.273 | 0.244 | 0.331 | | | | | | |

For `en`, the IndicVoices column is LibriSpeech dev. FLEURS `sd` is in Arabic script, while this
model writes Sindhi in Devanagari, so it is not scored.

### RNN-T or CTC

The checkpoint has both decoders. RNN-T is the default and is better on every set. Macro WER
over the 22 Indic languages, base model:

| Test set | CTC | RNN-T |
|---|---:|---:|
| IndicVoices | 0.2423 | **0.2222** |
| Kathbath | 0.1653 | **0.1607** |
| FLEURS | 0.1924 | **0.1901** |
| Vaani | 0.3672 | **0.3560** |

## How it compares (same clips, same scoring)

Published numbers for other models use other splits, normalizers and sometimes spelling-tolerant
metrics, so we decoded one shared set ourselves:
- 100 clips per language and test set, scored with this card's normalization;
- per-clip hypotheses and scores in `results/head-to-head.json`, so every cell can be re-scored.
  The comparison script itself is not published.

Each model gets the clip's language where it accepts one. SraVaani-1.0 has no language input and
detects the language itself.

**Indian languages**: macro WER over bn, hi, kn, ml, mr, ta, te:

| Test set | This model | SraVaani-1.0 (430M, MIT) | Indic-Transcribe-core (1.2B) |
|---|---:|---:|---:|
| FLEURS (read) | 0.195 | 0.188 | **0.181** |
| Kathbath (read) | 0.190 | **0.180** | 0.181 |
| Vaani (spontaneous) | 0.298 | **0.267** | 0.336* |
| Best of the 21 language Γ— test-set cells | 1 | 10 | 10 |

Both newer models are more accurate than this one on Indian languages. This comparison covers only
7 of the 22; the other 15 were not compared.

\* Indic-Transcribe writes standard spelling, while Vaani's references spell colloquial speech as
pronounced (Tamil especially: 0.539 WER, with transcripts that read correctly). Single-reference
WER counts that as error. SraVaani trains on Vaani, and so does our Tamil branch.

**English**: WER:

| Test set | This model | SraVaani-1.0 | Indic-Transcribe-core | Whisper-large-v3 (1.55B) |
|---|---:|---:|---:|---:|
| FLEURS en | 0.140 | 0.224 | 0.094 | **0.044** |
| Svarah (Indian accent) | 0.203 | 0.400† | 0.167 | **0.059** |
| Vaani en (Indian, spontaneous) | **0.117** | 0.127 | 0.132 | 0.141 |

† SraVaani wrote 34 of the 100 English Svarah clips in an Indic script. On the other 66 its WER is
0.172.

**Conditions:**
- Indic-Transcribe ran in its default "native" mode (native script, numbers as words), with the
  language given.
- Whisper was run on English only: on Indian languages it takes about 30 s per clip on our
  hardware, and its published Indic numbers are far behind.
- Indic-Transcribe's licence (Indic Open Model License v1) is more restrictive than CC-BY-4.0.

**This is not the most accurate model.** The case for it is the method: a 22-language model gained
English and a Tamil branch, with every other language provably unchanged.

## How it works

```
audio 16 kHz ─► log-mel 80 ─► Conformer encoder (24 layers, d=1024, 8x subsampling) ─┬─► CTC head (per-language rows)
                                   β–² after each layer: + adapter_L(x)  [branch L only] β”‚
                                                                                         β–Ό
          previous tokens ─► predictor (embed + 2-layer LSTM, 640) ─► joint ─► head_L (640 β†’ 257) ─► RNN-T tokens
                              └─ branch L uses its own copy β”€β”˜   └─ branch L: own enc/pred projections β”€β”˜
```

**Adding English without moving Indic.**
- The base model has 22 SentencePiece tokenizers of 256 pieces each, plus one output head per
  language. English gets a 23rd tokenizer, appended after the Indic ids, plus its own head and its
  own rows of the CTC matrix.
- The CTC blank moves to the last row, so every Indic language still selects the same 257 weights
  in the same order.
- Saved, restored and re-decoded, all 22 languages give identical text and a CTC log-prob
  difference of 0.0.

**Language branches.** A branch for language L owns:
- a zero-initialized bottleneck adapter (1024 β†’ 512 β†’ 1024) after each of the 24 encoder layers, so
  a new branch starts out as the identity;
- its own copy of the RNN-T predictor and of the joint projections. All languages share the
  originals, so training them for one language would move every other;
- L's own output head and L's CTC rows. The CTC gradient is masked to L's rows with zero weight
  decay, so AdamW leaves the other rows exactly where they were.

**Checked, not assumed.**
- Every shared BatchNorm is pinned to eval.
- Every run ends by comparing all 1,035 shared tensors with the original using `torch.equal`.
- Branch files load in any combination, and each is active only for its language.

**What didn't work, and the decisions it led to.**
- **Fine-tuning the whole model on Indic + English** made Indic worse on held-out read speech
  (Kathbath +0.65, FLEURS +0.30 macro WER). English also stalled at 0.155 on LibriSpeech. Branches
  replaced it: English reached 0.035 and the Indic languages were untouched.
- **Five Indic branches were trained** (ml, ta, te, kn, sat), and all of them improved on
  conversational IndicVoices. Only Tamil also improved on out-of-domain read speech (Kathbath,
  FLEURS), so only Tamil ships. The rule was: FLEURS must not get worse, and the held-out macro
  must fall.
- **Indian-accented English was the weakest English.** Continuing the English branch on 150 h of
  Common Voice South Asian English improved Svarah from 0.209 to 0.180 and FLEURS en from 0.165
  to 0.143, for 0.3 points on LibriSpeech.

### Optional: Telugu branch

`branches/optional/branch-te.pt` is better on conversational Telugu, but not clearly better on
read speech, so it is not loaded by default. Change in WER points, branch minus base:

| Decoder | IndicVoices | Kathbath | FLEURS | Vaani |
|---|---:|---:|---:|---:|
| RNN-T | βˆ’1.41 | +0.51 | βˆ’0.12 | +0.16 |
| CTC | βˆ’1.14 | βˆ’0.42 | +0.06 | βˆ’1.06 |

## Training

The base model is frozen. Each branch was trained on one NVIDIA L40S in bf16 with the base's
hybrid loss (RNN-T + 0.3 Γ— CTC) and SpecAugment:
- AdamW, lr 1e-3 for adapters and 1e-4 for the copies (3e-4 / 5e-5 for the English
  continuation), cosine schedule, 1,000 warmup steps;
- an effective batch of 48 utterances of 0.4–20 s.

| Branch | Data | Steps |
|---|---|---:|
| English | 1. LibriSpeech 960 h + Vaani en, 18,457 steps (3 epochs). 2. Continued 7,085 steps on LibriSpeech + Vaani en + Common Voice 26.0 South Asian English (150 h, 2,270 speakers), Indian rows 2Γ— | 25,542 |
| Tamil | IndicVoices ≀ 200 h, Vaani ≀ 30 h, Kathbath train 110 h (every Kathbath valid speaker removed) | 4,662 |
| Telugu (optional) | IndicVoices ≀ 200 h, Vaani ≀ 30 h, Kathbath train 82 h (valid speakers removed) | 4,662 |

**Data filters:**
- duration 0.4–20 s;
- the reference script must match the language's script;
- speech rate ≀ 25 characters/s;
- no unknown tokens;
- every file decoded once before training.

**Test sets:**
- **IndicVoices valid:** speaker-disjoint from training. The base checkpoint was selected on this
  set, which slightly favours the base.
- **Kathbath valid:** its speakers are excluded from branch training. The AI4Bharat base was
  trained on Kathbath's training split, so this is in-domain read speech for the base.
- **FLEURS test:** fully out of domain.
- **Vaani test**, **Svarah test**, **LibriSpeech test-clean**.
- **Common Voice South Asian English test:** 1,000 clips, 0 speakers shared with training.
- Every eval report is in `results/`.

## Limitations

- **You must name the language.** There is no language identification, and code-switched speech
  decodes through one language's head.
- **Output format:** text is lowercase with no punctuation. Numbers come out as the training labels
  wrote them.
- **Accuracy varies widely by language.** Kannada, Odia, Urdu, Kashmiri, Santali and Konkani are much
  weaker on spontaneous speech (Vaani WER 0.40–0.61).
- **Single-reference scoring:** WER on Indic languages counts spelling variants as errors.
- **Size:** about 2.5 GB in fp32. No quantized or distilled version is published here yet.

## Files

| File | What it is |
|---|---|
| `Dhvani-ASR.nemo` | AI4Bharat's IndicConformer-600M with English added as a 23rd language. On its own, its English head is untrained; load `branch-en.pt` |
| `branches/branch-en.pt` | English branch |
| `branches/branch-ta.pt` | Tamil branch |
| `branches/optional/branch-te.pt` | Telugu branch, not loaded by default |
| `language_branches.py` | Loads and routes branches (`load_branch`, `set_language`) |
| `transcribe.py` | Command-line transcription |
| `results/*.json` | Every evaluation behind the tables above, with hypotheses. `head-to-head.json` is the comparison with other models |
| `SHA256SUMS` | Checksums of the weights |

## Licence and attribution

The weights are released under **CC-BY-4.0**. The code is MIT.

This is a derivative of **IndicConformer-600M multilingual** by **AI4Bharat**. Its 22 Indic
languages are their work and are unchanged here. Training data: LibriSpeech, IndicVoices, Kathbath
and Vaani (CC-BY-4.0), and Common Voice 26.0 South Asian English (CC0). Evaluation also used FLEURS
and Svarah.

If you use this model, please cite AI4Bharat's IndicVoices / IndicConformer work, and link to this
repository.