Views
No views yet
whisper-large-v3-ar-eg
— same accuracy — but it keeps Whisper's timestamp prediction, so every transcript stays
anchored to the recording.ar-quran-cm17-timestamps
was mixed into 23.4 % of the training rows.whisper-large-v3-ar-eg — timestamp supervision costs no accuracy.
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 spontaneous | 17.20 | 6.32 |
return_timestamps=False; the timestamps are an additional
output, not a different transcript.1import torch
2from transformers import pipeline
3
4pipe = pipeline(
5 "automatic-speech-recognition",
6 model="Dr-AliGomaa/whisper-large-v3-ar-eg-timestamps",
7 torch_dtype=torch.float16,
8 device="cuda:0",
9 chunk_length_s=30,
10)
11
12gen = {
13 "language": "arabic",
14 "task": "transcribe",
15 "num_beams": 5,
16 "temperature": (0.2),
17 "condition_on_prev_tokens": False,
18 "compression_ratio_threshold": 1.35,
19 "logprob_threshold": -1.0,
20 "max_new_tokens": 444,
21}
22
23out = pipe("lecture.mp3", return_timestamps="word", generate_kwargs=gen)
24
25for ch in out["chunks"][:10]:
26 start, end = ch["timestamp"]
27 print(f"{start:7.2f} → {end:7.2f} {ch['text']}")out = pipe("lecture.mp3", return_timestamps=True, generate_kwargs=gen)1def group_words(chunks, max_gap=0.6, max_dur=12.0):
2 """Word chunks -> sentence-ish spans. Break on a silence gap or on length."""
3 spans, cur = [], None
4 for ch in chunks:
5 start, end = ch["timestamp"]
6 if start is None or end is None: # dropped word, keep the text
7 if cur: cur["text"] += ch["text"]
8 continue
9 if cur is None:
10 cur = {"start": start, "end": end, "text": ch["text"]}
11 continue
12 gap = start - cur["end"]
13 if gap > max_gap or (end - cur["start"]) > max_dur:
14 spans.append(cur)
15 cur = {"start": start, "end": end, "text": ch["text"]}
16 else:
17 cur["end"] = end
18 cur["text"] += ch["text"]
19 if cur: spans.append(cur)
20 return spans
21
22for s in group_words(out["chunks"]):
23 print(f"[{s['start']:.2f}–{s['end']:.2f}] {s['text'].strip()}")max_gap to the material: recitation pauses between verses are long, so 0.6–1.0 s works
well; conversational speech needs a smaller value.timestamp = (None, None) if the model dropped the alignment —
keep the text, as the snippet above does, rather than dropping the word.return_timestamps=False and you get exactly
the behaviour of whisper-large-v3-ar-eg.pipeline/.eval/asr_score.py — Arabic WER moves materially with the normalizer.| Base | openai/whisper-large-v3 |
| Trained on | the Egyptian mix + timestamp supervision on 23.4 % of rows |
| Held out | Quran, Hadith, Egyptian (10 h), plus timestamps |
| Timestamp routing | a predict_timestamps flag sends each example to the timestamped or plain decoder prefix, so both live in one mix |
| Batch | 4 per device × 8 GPUs = 32 effective |
| Precision / distributed | bf16 + tf32, DeepSpeed ZeRO |
training/training.py.1@misc{kotb2026quranhadith,
2 title = {A Quran and Hadith Speech Resource and Benchmark for Arabic ASR,
3 with Professional-Reciter Training and Validation},
4 author = {Mohamed Kotb},
5 year = {2026},
6 publisher = {Zenodo},
7 doi = {10.5281/zenodo.21927416},
8 url = {https://doi.org/10.5281/zenodo.21927416},
9 note = {Preprint}
10}