Downloads · 30 days
10
5% of all-time downloads
zainab11/whisper-small-ar-fleurs
whisper-small-ar-fleurs is a automatic speech recognition model from zainab11. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
openai/whisper-small fine-tuned on the Arabic (areg) subset of Google FLEURS (~6 hours of read MSA speech by Egyptian-accented speakers). Fine-tuning reduces normalized WER on the held-out FLEURS test split from 28.0%…
Downloads · 30 days
10
5% of all-time downloads
All-time downloads
198
Public
Parameters
242M
967 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors967 MB · 100%
From the Hugging Face model README
openai/whisper-small fine-tuned on the Arabic (ar_eg) subset of Google FLEURS (~6 hours of read
MSA speech by Egyptian-accented speakers). Fine-tuning reduces normalized WER on the held-out FLEURS
test split from 28.0% → 19.9% (−29% relative), at unchanged inference cost.
| Model | Raw WER | Normalized WER | Normalized CER | RTF (T4, fp16) |
|---|---|---|---|---|
| openai/whisper-small (zero-shot) | 33.07% | 28.02% | 8.51% | 0.079 |
| this model | 25.82% | 19.90% | 6.77% | 0.077 |
| openai/whisper-large-v3-turbo (zero-shot, reference) | 16.61% | 10.10% | 3.13% | 0.050 |
Normalization: NFC, diacritics/tatweel removal, alef & ya unification, punctuation stripping — applied identically to references and predictions. One undecodable test sample excluded (documented).
Evaluated zero-shot on a 400-clip subset of Casablanca Egypt test (seed 42) — real spontaneous
Egyptian dialect, never seen in training. All clips ≤26s (duration-audited: no truncation).
| Model | Norm WER | Norm CER | Insertion rate |
|---|---|---|---|
| whisper-small (zero-shot) | 103.3% | 76.1% | 0.330 |
| this model | 81.2% | 50.7% | 0.066 |
| whisper-large-v3-turbo (zero-shot) | 71.8% | 35.9% | 0.197 |
Three takeaways: (1) no off-the-shelf model — including turbo — reaches usable accuracy on spontaneous Egyptian; (2) fine-tuning on read MSA still transferred a 21-point WER gain, driven almost entirely by decoding discipline (insertions collapsed 0.33 → 0.07 — the lowest hallucination rate of the three, below even turbo); (3) dialect WER partly reflects non-standardized dialect orthography — CER is the kinder acoustic view. Full analysis: phase 4 report.
ar_eg train (2,102 clips ≤30s ≈ 6h); labels = dataset's transcription fieldAcoustic substitutions improved most (16/19 samples), numbers 7/7, named entities 9/12; rare technical terms unchanged. Number-format gains partly reflect adaptation to FLEURS's orthographic conventions and may not transfer out of domain.
# pip install transformers torch librosa soundfile
import torch
import librosa
from transformers import WhisperProcessor, WhisperForConditionalGeneration
# 1. Load the model
MODEL_ID = "zainab11/whisper-small-ar-fleurs"
processor = WhisperProcessor.from_pretrained(MODEL_ID)
model = WhisperForConditionalGeneration.from_pretrained(MODEL_ID)
device = "cuda" if torch.cuda.is_available() else "cpu"
model = model.to(device).eval()
# 2. Load any audio file (WAV/MP3/...) — converted to mono 16 kHz automatically
audio_path = "my_audio.wav" # <-- put your file here
audio, sr = librosa.load(audio_path, sr=16000, mono=True)
print(f"Audio duration: {len(audio)/sr:.2f}s")
# 3. Audio -> log-Mel features (+ attention mask)
inputs = processor(audio, sampling_rate=16000,
return_attention_mask=True, return_tensors="pt")
input_features = inputs.input_features.to(device)
attention_mask = inputs.attention_mask.to(device)
# 4. Transcribe (Arabic)
with torch.no_grad():
ids = model.generate(input_features,
attention_mask=attention_mask,
language="ar", task="transcribe")
# 5. Decode
print(processor.batch_decode(ids, skip_special_tokens=True)[0])
Note: clips longer than 30s are truncated by this simple example (Whisper's window). For long audio, use the chunked pipeline or segment first.
Fine-tuned on read MSA speech with Egyptian-accented speakers — not spontaneous Egyptian dialect, noisy telephony, or code-switched speech. Inherits Whisper's known long-form repetition/hallucination behavior. As measured on dialectal data above, the model is not suitable for spontaneous Egyptian without further dialect fine-tuning
Part of an end-to-end Arabic ASR study (baselines → normalization → error analysis → fine-tuning): github.com/zainabayman11/whisper-ar-skeleton
🎙️ Try it live: whisper-ar-demo