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.
Paper: Small Conformer-CTC Models for On-Device Quranic Recitation Recognition · DOI 10.5281/zenodo.23761691
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).
Exact ayah with tashkeel (retrieval)
The model writes bare Uthmani letters, and a letter or word can come out wrong. To show what was recited as the exact Quran text, with full tashkeel, match the output against the mushaf with retrieve.py (pip install rapidfuzz; it downloads the Hafs Uthmani text once):
from retrieve import Quran
quran = Quran()
m = quran.find("قل هو الله احد الله الصمد") # the model's output
m["ref"] # '112:1-2'
m["text"] # 'قُلۡ هُوَ ٱللَّهُ أَحَدٌ ٱللَّهُ ٱلصَّمَدُ' (the recited words)
m["ayahs"] # the full ayahs, with tashkeel
On the benchmark's QUL and phone clips it returns the right ayah for 97% of clips, in about 10 ms each. Some ayahs occur word for word in several places (e.g. 3:182 and 8:51): pass near=(sura, aya), such as the previous match or the page being read, to pick the closest one (99.5% with it).
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).
Citation
@misc{fadheli2026quranasr,
author = {Fadheli, Abdeladim},
title = {Small Conformer-CTC Models for On-Device Quranic Recitation Recognition},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.23761691},
url = {https://zenodo.org/records/23761691}
}
License
MIT. Training data keeps its own terms (tlog: CC-BY-4.0).