quran-asr-small
A 33M-parameter Quran recitation recognizer that runs offline on a phone (36 MB int8 ONNX, sherpa-onnx). It writes the Arabic letters of what is recited, for professional reciters and ordinary people, Hafs and Warsh, slow tartil to fast hadr. Big brother of quran-asr-tiny.
4.49% WER · 2.17% CER on the Quran-Lab benchmark, #2 of 33 on the leaderboard at submission. None of the benchmark's reciters or recordings were used for training.
Results
Quran-Lab benchmark, official score.py, 600 clips. WER / CER in %.
| Model | Params | Overall | Phone | EveryAyah | QUL |
|---|---|---|---|---|---|
| zipformer_p-arabic-v3 (retrieval) | 66M | 3.46 / 1.84 | 7.56 / 1.79 | 0.00 / 0.00 | 4.40 / 3.77 |
| quran-asr-small (int8) | 33M | 4.49 / 2.17 | 10.45 / 2.84 | 0.69 / 0.20 | 4.61 / 3.80 |
| fastconformer-quran | 115M | 5.41 / 2.96 | 8.88 / 2.66 | 0.93 / 0.26 | 7.78 / 5.91 |
| NVIDIA FastConformer | 115M | 7.44 / 3.08 | 16.77 / 5.61 | 1.50 / 0.49 | 7.61 / 4.20 |
| Whisper large-v3 | 1.5B | 10.10 / 4.26 | 26.23 / 12.39 | 5.48 / 1.79 | 4.69 / 1.83 |
Reciters never seen in training (our test set, 1,000 clips): 0.30% CER, 0.46% WER.
Notes
- The model writes Uthmani spelling. For the benchmark, output words are rewritten in standard spelling with a fixed table (
spelling.json) that never changes a misrecognized word. The phone references are themselves Uthmani, where raw output scores 3.29 / 1.16. - One phone clip of the benchmark (36:71) turned out to be the same recording as one in our training data, uploaded twice under different ids; it is excluded from future training.
- Greedy CTC, no language model, no lexicon, no hints.
Usage
pip install sherpa-onnx soundfile numpy scipy
python transcribe.py recitation.wav # Uthmani letters
python transcribe.py recitation.wav --standard # standard spelling
On Android / iOS the model loads as a sherpa-onnx zipformer CTC model (model.int8.onnx + tokens.txt).
Model and training
- Conformer-CTC: 9 blocks, d=384, 6 heads, ×4 subsampling, 31 output tokens (Arabic letters + word separator). InterCTC after block 5 during training.
- Data (1,532 h): 36 EveryAyah Hafs reciters (1,132 h), 3 Warsh reciters (96 h), tarteel-ai/tlog phone recordings (283 h, 200 shards, labels checked against the audio), Iqra'Eval Quranic sentences (21 h). Ordinary people are 30% of each epoch.
- 343k steps, 20 epochs, ~33,000 h of audio seen, ~37 h on one laptop GPU (RTX 5070 Ti Laptop). AdamW 4e-4, cosine, bf16; speed, tempo (×0.75 to ×2.5), noise, reverb, low-pass and SpecAugment.
- Released checkpoint: step 310k (lowest validation error, 0.84% CER).
Training code: code/ (config/base.yaml).
License
MIT. Training data keeps its own terms (tlog: CC-BY-4.0).
Datasets used to train Abdou/quran-asr-small
IqraEval/Iqra_train
Evaluation results
- WER (overall) on Quran-Lab Quranic ASR Benchmarkself-reported4.490
- CER (overall) on Quran-Lab Quranic ASR Benchmarkself-reported2.170


