Nemotron 3.5 ASR Streaming — Sinhala + Tamil + English (470 h)
A real-time (streaming) speech recognition model for Sinhala, Tamil and English, fine-tuned from
nvidia/nemotron-3.5-asr-streaming-0.6b (cache-aware FastConformer encoder + RNN-Transducer decoder, 0.6 B parameters)
on about 470 hours of speech from TriLingDATA/si-ta-en-asr.
- One model, three languages, one shared vocabulary (2042 SentencePiece pieces, balanced per script).
- Works with or without being told the language (language prompt
si-LK,ta-IN,en-USorauto). - Streaming with selectable look-ahead: 80 ms, 320 ms or 1.12 s per chunk; the encoder only keeps a cache of the last ≈ 4.5 s.
- Tamil covers both read speech (Common Voice) and spontaneous, code-switched speech with English words (IndicTTS).
- Output: lower-case text without punctuation (Sinhala, Tamil and Latin script).
Results
Validation sets: val_si, val_ta (Common Voice and IndicTTS parts) and val_en of the dataset, from speakers not used in
training. Scores are percentages, lower is better. WER / CER = word / character error rate with punctuation removed from reference
and output (references lower-cased); the "with punctuation" columns are shown for completeness (the model writes no punctuation).
Recommended model: best_model/ (step 21,000, epoch 2.42), look-ahead 1.12 s, language given
| WER | CER | WER with punctuation | CER with punctuation | |
|---|---|---|---|---|
| Sinhala | 25.85 | 5.96 | 30.67 | 6.99 |
| Tamil | 36.48 | 15.75 | 49.96 | 17.85 |
| English | 4.36 | 1.38 | 18.73 | 4.38 |
| Tamil - Common Voice | 38.34 | 8.71 | 50.73 | 10.49 |
| Tamil - IndicTTS | 36.21 | 16.98 | 49.85 | 19.12 |
| Average (3 languages) | 22.23 | 7.70 | 33.12 | 9.74 |
final_model/ (step 25,980, epoch 3.00)
| WER | CER | WER with punctuation | CER with punctuation | |
|---|---|---|---|---|
| Sinhala | 25.56 | 5.94 | 30.45 | 6.97 |
| Tamil | 37.30 | 16.48 | 50.46 | 18.56 |
| English | 4.30 | 1.39 | 18.76 | 4.39 |
| Tamil - Common Voice | 38.34 | 8.30 | 50.54 | 10.09 |
| Tamil - IndicTTS | 37.15 | 17.91 | 50.45 | 20.03 |
| Average (3 languages) | 22.39 | 7.94 | 33.22 | 9.97 |
Streaming latency and language-agnostic mode (final model, WER)
look-ahead (att_context_size) | chunk latency | Sinhala | Tamil | English | average |
|---|---|---|---|---|---|
[56, 0] | 80 ms | 27.86 | 38.99 | 7.96 | 24.94 |
[56, 3] | 320 ms | 26.42 | 37.68 | 5.45 | 23.18 |
[56, 13] | 1120 ms | 25.56 | 37.30 | 4.30 | 22.39 |
[56, 13], language not given (auto) | 1120 ms | 25.92 | 37.48 | 4.29 | 22.56 |
Shorter look-ahead = text appears sooner with somewhat more errors. Telling the model the language changes the result very little, so the
auto mode can be used when the language is unknown.
Read the CER for Sinhala and Tamil. Their words are long and many "word errors" are spacing differences
(e.g. இதைப் பற்றி vs இதைப்பற்றி, ගෙදරට ය vs ගෙදරටය) where every letter is correct.
Validation during training (WER)
| step | epoch | average | Sinhala | Tamil | English | Tamil - Common Voice | Tamil - IndicTTS |
|---|---|---|---|---|---|---|---|
| 1,000 | 0.12 | 89.66 | 100.00 | 96.78 | 72.21 | 99.80 | 96.34 |
| 3,000 | 0.35 | 52.13 | 76.60 | 66.37 | 13.41 | 72.68 | 65.45 |
| 5,000 | 0.58 | 38.32 | 54.00 | 52.75 | 8.21 | 55.12 | 52.40 |
| 7,000 | 0.81 | 31.47 | 40.39 | 47.54 | 6.48 | 49.85 | 47.20 |
| 9,000 | 1.04 | 29.02 | 36.00 | 45.17 | 5.89 | 47.51 | 44.83 |
| 11,000 | 1.27 | 26.70 | 32.61 | 41.99 | 5.50 | 45.07 | 41.54 |
| 13,000 | 1.50 | 26.17 | 32.54 | 40.45 | 5.53 | 43.02 | 40.07 |
| 15,000 | 1.73 | 24.96 | 29.45 | 40.43 | 5.01 | 41.56 | 40.27 |
| 17,000 | 1.96 | 24.03 | 27.14 | 40.15 | 4.81 | 39.51 | 40.24 |
| 19,000 | 2.19 | 23.74 | 27.86 | 38.42 | 4.93 | 38.05 | 38.48 |
| 21,000 | 2.42 | 22.23 | 25.85 | 36.48 | 4.36 | 38.34 | 36.21 |
| 23,000 | 2.66 | 22.81 | 26.06 | 37.96 | 4.41 | 37.17 | 38.08 |
| 25,000 | 2.89 | 22.52 | 25.92 | 37.25 | 4.38 | 38.54 | 37.07 |
| 25,980 | 3.00 | 22.39 | 25.56 | 37.30 | 4.30 | 38.34 | 37.15 |
Usage
pip install "nemo_toolkit[asr] @ git+https://github.com/NVIDIA/NeMo.git@v3.0.0" "numba-cuda[cu12]"
import torch, soundfile as sf, librosa
from huggingface_hub import hf_hub_download
from nemo.collections.asr.models import ASRModel
model = ASRModel.restore_from(hf_hub_download("TriLinSL/nemotron-3.5-asr-streaming-si-ta-en-480h", "best_model/model.nemo")).eval().cuda()
model.encoder.set_default_att_context_size([56, 13]) # look-ahead: [56, 13] = 1.12 s, [56, 3] = 320 ms, [56, 0] = 80 ms
PROMPT = dict(model.cfg.model_defaults.prompt_dictionary) # "si-LK", "ta-IN", "en-US", "auto"
@torch.inference_mode()
def transcribe(path, lang = "auto"):
y, sr = sf.read(path, dtype = "float32", always_2d = True)
y = librosa.resample(y.mean(axis = 1), orig_sr = sr, target_sr = 16000) if sr != 16000 else y.mean(axis = 1)
sig = torch.tensor(y, device = "cuda")[None]
enc, enc_len = model.forward(input_signal = sig, input_signal_length = torch.tensor([sig.shape[1]], device = "cuda"),
prompt_indices = torch.tensor([PROMPT[lang]], device = "cuda"))
hyp = model.decoding.rnnt_decoder_predictions_tensor(encoder_output = enc, encoded_lengths = enc_len)
hyp = hyp[0] if isinstance(hyp, tuple) else hyp
return hyp[0].text
print(transcribe("sinhala.wav", "si-LK"), transcribe("tamil.wav", "ta-IN"), transcribe("english.wav", "en-US"), transcribe("mixed.wav", "auto"))
Note: in NeMo v3.0.0, model.transcribe(..., target_lang=...) does not pass the language through its data loader for this model type
("Unknown prompt key: 'None'"); the direct call above is what the training validation used.
Real-time streaming: call model.set_inference_prompt(lang) once, then feed feature chunks to model.conformer_stream_step(...)
with the cache from model.encoder.get_initial_cache_state(1) (as in NeMo's
examples/asr/asr_cache_aware_streaming/speech_to_text_cache_aware_streaming_infer.py). For mixed-language speech in auto mode,
start a new hypothesis (previous_hypotheses=None) after each pause, so the next sentence chooses its language again.
Model architecture and what was trained
| part | role | in this fine-tuning |
|---|---|---|
| pre-processor | 80-dim log-mel features, 10 ms hop, no normalisation (streaming-safe) | unchanged |
| encoder: 8× subsampling + 24 FastConformer layers | acoustic model, cache-aware: left context 56 frames (≈ 4.5 s), right context 0/3/6/13 frames | lower 12 layers + subsampling frozen, upper 12 trained |
| language-prompt projection | one-hot prompt (128 slots, incl. si-LK 45, ta-IN 39, en-US 0, auto 101) mixed into every encoder frame | trained |
| prediction network (LSTM) | text memory over the pieces already written | new, trained from scratch |
| joint network | combines encoder frame + prediction network, outputs one of the 2042 pieces or blank | new, trained from scratch |
The original 13,087-piece vocabulary cannot write Sinhala, so it was replaced (change_vocabulary), which re-initialises the
prediction and joint networks; the encoder and the prompt layer keep their pre-trained weights.
Tokenizer
- Shared + balanced: one SentencePiece unigram model per script (Sinhala, Tamil, Latin) with an equal share of the vocabulary, merged into one model (Tamil 680, Sinhala 679, Latin 668, digits 12, other 2 pieces). Pieces never cross scripts, so each language is segmented only by its own pieces; English words inside Sinhala/Tamil sentences use the same Latin pieces as English speech.
- Trained on all training transcripts (never on validation/test text), Unicode NFC,
identitynormalisation (Sinhala ZWJ/ZWNJ kept), punctuation removed, Latin lower-cased,character_coverage = 1.0. - Size chosen by a study on the training text: a bigger vocabulary was only accepted if it shortened the token sequences by ≥ 5 % and the rarest 5 % of every script's pieces still occurred ≥ 200 times.
| candidate size | pieces si / ta / Latin | rarest 5 % of pieces occur (si / ta / Latin) | total tokens in training text |
|---|---|---|---|
| 1024 | 338 / 339 / 329 | 166 / 1079 / 1554 times | 8,695,337 |
| 1536 | 508 / 509 / 499 | 310 / 687 / 729 times | 7,765,271 |
| 2048 | 679 / 680 / 668 | 239 / 476 / 508 times | 7,179,228 |
Training data
| language | training audio | clips | speakers | validation | sources |
|---|---|---|---|---|---|
| Sinhala | 149.7 h | 123,969 | 438 | 300 (40 speakers) | openslr_sinhala: 149.7 h / val {'openslr_sinhala': 300} |
| Tamil | 160.0 h | 58,608 | 793 | 300 (50 speakers) | common_voice_tamil: 83.6 h, indic_tts_tamil: 76.4 h / val {'common_voice_tamil': 150, 'indic_tts_tamil': 150} |
| English | 160.0 h | 94,787 | 948 | 300 (11 speakers) | libritts_r: 160.0 h / val {'libritts_r': 300} |
- Dataset commit
ebe87732aeb7, selection fingerprint10d0b8437ac8. - Tamil: all Common Voice (read speech) first, IndicTTS (spontaneous, code-switched) filled the rest.
- Speakers of the validation clips were removed from training (Sinhala validation drawn from 40 speakers to limit the loss of training audio).
- Clips of 1–30 s; the selected clips of all languages and sources were shuffled together, and the sampler reshuffles every epoch.
Training procedure
- NeMo v3.0.0, 1 × NVIDIA A40 (48 GB), fp16 mixed precision.
- 32 clips per optimizer step (length-bucketed), AdamW lr 0.0002, betas (0.9, 0.98), weight decay 0.01, 300 warm-up steps then linear decay to 0, gradient clipping 0.5.
- 3 epochs = 25,980 steps; validation every 1000 steps, best checkpoint by the average WER of the three languages (step 21,000); early stopping not triggered.
- Language prompt: 50 % of training clips with their language slot, 50 % with
auto. Streaming look-aheads sampled during training (as in the base model). SpecAugment from the base configuration. - Audio augmentation (training clips only): per-source probability openslr_sinhala 0.5, libritts_r 0.5, indic_tts_tamil 0.4, common_voice_tamil 0.15; random room echo, microphone colouring, phone channel (300–3400 Hz, 8-bit mu-law), background noise (10–35 dB SNR) and quieter-only volume change. Goal: recording conditions must not identify the language (the Sinhala and English sources are clean, Common Voice is noisy).
Repository contents
| path | content |
|---|---|
best_model/model.nemo | recommended: best average validation WER (step 21,000) + best_metrics.json |
final_model/model.nemo | after the last step + results.json (all scores, validation history, configuration) |
tokenizer/ | the shared SentencePiece tokenizer |
last-checkpoint/ | Lightning checkpoint with optimizer state (only needed to continue training) |
data_info/ | pinned dataset commit, data summary and the tokenizer study |
tensorboard/, train.log, run_config.json | training curves, full log, run configuration |
Limitations
- Domains: read sentences (OpenSLR Sinhala, Common Voice Tamil), audiobooks (LibriTTS-R English) and talk-style Tamil (IndicTTS). Expect higher error rates on conversational, far-field or telephone speech of other domains.
- No punctuation or capitalisation in the output.
- Language switching: every training clip is in one language (English words inside Sinhala/Tamil excepted). Switching between Sinhala and Tamil inside one sentence tends to stay in the first language's script; after a pause and a decoder reset (see Usage) the model chooses the new language.
- Sinhala validation speakers come from a source whose train/test splits share speakers; Sinhala scores may be slightly optimistic.
- Validation sets are 300 clips per language; differences below about 1 WER point are within noise. Test-set results will be added.
License and citation
The weights are derived from nvidia/nemotron-3.5-asr-streaming-0.6b (© NVIDIA Corporation) and are released under the same license.
Use must also follow the licenses of the data sources: OpenSLR Sinhala (via SPEAK-ASR/openslr-sinhala-asr), Common Voice 22.0 Tamil (CC0),
IndicTTS Tamil (psk/indic-tts-966h) and LibriTTS-R (mythicinfinity/libritts_r). Please cite the base model and the source datasets.