Nepali ASR (XLS-R 300M): Nepali speech to text
नेपाली स्पीच टु टेक्स्ट · बोलीबाट नेपाली पाठ
Try it in your browser: Open in Google Colab. Upload a Nepali recording and get Devanagari text. Free, no setup.
Open speech recognition for Nepali. A fine-tune of facebook/wav2vec2-xls-r-300m on 611 hours of Nepali speech, producing Devanagari text.
316M parameters, 16 kHz mono input, CTC decoding with no language model. Runs on CPU.
Free for research, teaching and non-commercial use. For commercial use, contact hello@blackfire.com.np.
Install
pip install torch==2.13.0 torchaudio==2.11.0 transformers==5.17.0 soundfile==0.14.0
Those are the versions this model was tested with. Newer ones will most likely work. No GPU needed, it is fast on CPU.
Usage
import soundfile as sf
import torch
from transformers import AutoModelForCTC, AutoProcessor
name = "BlackfireAI/nepali-asr-xlsr-300m"
processor = AutoProcessor.from_pretrained(name)
model = AutoModelForCTC.from_pretrained(name).eval()
audio, sr = sf.read("audio.wav", dtype="float32") # must be 16 kHz mono
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
logits = model(inputs.input_values).logits
print(processor.batch_decode(logits.argmax(-1).numpy())[0])
Results
FLEURS Nepali test split, 400 utterances, held out and never trained on. Greedy CTC, punctuation stripped, NFC normalised.
| metric | value |
|---|---|
| CER | 0.1198 |
| WER | 0.3744 |
Scored in the same run against public Nepali ASR models on the same 400 utterances:
| model | CER | WER |
|---|---|---|
| this model | 0.120 | 0.374 |
| anish-shilpakar/wav2vec2-nepali | 0.160 | 0.483 |
| gagan3012/wav2vec2-xlsr-nepali | 0.225 | 0.672 |
| spktsagar/wav2vec2-large-xls-r-300m-nepali-openslr | 0.252 | 0.837 |
Three further models returned CER at or above 1.0 on this set and are excluded as non-functional rather than weak.
We have not yet scored multilingual models such as Whisper large-v3, MMS and Omnilingual ASR, or other recent Nepali fine-tunes, in this same run. They will be added to this table.
Limitations
- No punctuation or capitalisation. The vocabulary is 68 Devanagari characters plus separator, pad and unknown.
- Devanagari only. It cannot transcribe English, and fails on code-switched Nepali and English speech (CER 0.626 on a 1,737 utterance code-switched set).
- Numbers are output as words, not numerals.
- No built in segmentation. Chunk long audio with a VAD first.
- Trained mostly on read, broadcast and narrated speech. Spontaneous conversation is harder.
Training data
611 hours of Nepali speech. Principal sources: IndicVoices (378.4 h), OpenSLR 54 and 43 (81.5 h), IndicVoices-R (49.9 h), internal recordings (42.2 h), Vaani (27.2 h), WorldSpeech (12.9 h) and the FLEURS train split (1.2 h).
The FLEURS test split was held out.
Licence
CC BY-NC-SA 4.0. Non-commercial use only. For commercial use, contact hello@blackfire.com.np.
Base model facebook/wav2vec2-xls-r-300m is Apache 2.0.
Citation
@misc{blackfire2026nepaliasr,
title = {Nepali ASR: an XLS-R 300M fine-tune for Devanagari Nepali},
author = {Blackfire A.I. Pvt. Ltd.},
year = {2026},
url = {https://github.com/BlackfireAI/nepali-asr-xlsr}
}
Code, evaluation scripts and reproducible benchmarks: github.com/BlackfireAI/nepali-asr-xlsr