Instructions to use Dr-AliGomaa/whisper-large-v3-ar-eg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dr-AliGomaa/whisper-large-v3-ar-eg with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="Dr-AliGomaa/whisper-large-v3-ar-eg")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("Dr-AliGomaa/whisper-large-v3-ar-eg") model = AutoModelForSpeechSeq2Seq.from_pretrained("Dr-AliGomaa/whisper-large-v3-ar-eg", device_map="auto") - Notebooks
- Google Colab
- Kaggle
whisper-large-v3-ar-eg
openai/whisper-large-v3 fine-tuned for Quran, Hadith and Egyptian Arabic at once. Same
sacred-text fidelity as the MSA model, extended to a new domain — and the point of the model is
that adding that domain cost almost nothing.
- Paper: A Quran and Hadith Speech Resource and Benchmark for Arabic ASR (preprint, DOI) · Code: github.com/DrAliGomaa/quran-hadith-asr
- Created by Mohamed Kotb · Under the patronage of Prof. Ali Gomaa, former Grand Mufti of Egypt, who reviewed the handling of the religious material.
- Data:
ar-quran-hadith14books-MSA
Results
Normalized WER/CER (%), scored with
eval/asr_score.py.
| Evaluation | WER | CER |
|---|---|---|
| Quran (ʿAbd al-Bāsiṭ, 7,280 clips) | 0.50 | 0.14 |
| Hadith (Bukhari + Muslim, 4,752 clips) | 3.71 | 1.08 |
Egyptian — ar-eg-dataset validation, same speaker/register |
5.41 | 1.76 |
| Egyptian — lahgtna-v3, zero-shot, unseen speakers, spontaneous | 17.20 | 6.32 |
| MGB-2 | — (in this model's training set; not evaluated) |
Adding a domain did not erode sacred text. Against the MSA model: Quran 0.33 → 0.50, Hadith 3.60 → 3.71 — essentially flat — while Egyptian dropped from ~12 to 5.41. That is the paper's central claim, and it is why this resource can be added to an existing mix rather than replacing it.
Be careful with 5.41. The Egyptian training data is a single speaker in a formal scholarly register. 5.41 measures same-speaker, same-register adaptation. On unseen spontaneous Egyptian we reach 17.20 and trail a general-purpose baseline (11.95). Both numbers are honest; they measure different things.
Usage
import torch
from transformers import pipeline
pipe = pipeline(
"automatic-speech-recognition",
model="Dr-AliGomaa/whisper-large-v3-ar-eg",
torch_dtype=torch.float16,
device="cuda:0",
chunk_length_s=30,
)
gen = {
"language": "arabic",
"task": "transcribe",
"num_beams": 5,
"temperature": (0.2),
"condition_on_prev_tokens": False,
"compression_ratio_threshold": 1.35,
"logprob_threshold": -1.0,
"return_timestamps": False,
"max_new_tokens": 444,
}
print(pipe("audio.mp3", generate_kwargs=gen)["text"])
This model does not emit timestamps. For identical accuracy with time alignment, use
whisper-large-v3-ar-eg-timestamps.
Two things that will otherwise cost you accuracy
1. Run the audio pipeline first — silence-trim, loudness-normalize to −16 LUFS, edge-pad
100 ms, gain-correct, segment ≤ 30 s. Required to reproduce these numbers.
pipeline/.
2. Score with eval/asr_score.py — Arabic WER moves materially with the normalizer.
Training
| Base | openai/whisper-large-v3 |
| Trained on | the MSA mix + 40 h Egyptian (Prof. Ali Gomaa) + MGB-2 folded in for scale + timestamped data |
| Held out | Quran, Hadith, Egyptian (10 h). MGB-2 is not held out for this model. |
| Learning rate | 5e-6, linear decay with warmup |
| Batch | 4 per device × 8 GPUs = 32 effective |
| Precision / distributed | bf16 + tf32, DeepSpeed ZeRO |
| Augmentation | 1 clean + 4 independently-augmented waveform passes; scarce splits oversampled |
Full recipe: training/training.py.
Intended use and limits
- For transcription assistance and research. Not an authority on the correct text of the Quran or hadith — verify against canonical written sources before any religious use.
- Output is Imlāʾī orthography without tashkīl; numerals are Arabic words — not for numeric transcription.
- Not a general Egyptian-dialect model. One speaker, formal register.
- Religious content reviewed and approved by Prof. Ali Gomaa, former Grand Mufti of Egypt
and member of Al-Azhar's Council of Senior Scholars, under whose patronage this work was
carried out; he is also the speaker of
ar-eg-dataset, released with his permission.
Citation
@misc{kotb2026quranhadith,
title = {A Quran and Hadith Speech Resource and Benchmark for Arabic ASR,
with Professional-Reciter Training and Validation},
author = {Mohamed Kotb},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.21927416},
url = {https://doi.org/10.5281/zenodo.21927416},
note = {Preprint}
}
- Downloads last month
- 420
Model tree for Dr-AliGomaa/whisper-large-v3-ar-eg
Base model
openai/whisper-large-v3Datasets used to train Dr-AliGomaa/whisper-large-v3-ar-eg
Dr-AliGomaa/ar-quran-hadith14books-MSA
Evaluation results
- WER (normalized) on Quran (ʿAbd al-Bāsiṭ) — ar-quran-hadith14books-MSA validationvalidation set self-reported0.500
- CER (normalized) on Quran (ʿAbd al-Bāsiṭ) — ar-quran-hadith14books-MSA validationvalidation set self-reported0.140
- WER (normalized) on Hadith (Bukhari + Muslim) — hadith_validationself-reported3.710
- CER (normalized) on Hadith (Bukhari + Muslim) — hadith_validationself-reported1.080
- WER (normalized) on Egyptian (same speaker/register) — ar-eg-dataset validationvalidation set self-reported5.410
- CER (normalized) on Egyptian (same speaker/register) — ar-eg-dataset validationvalidation set self-reported1.760