Fine-tuned
openai/whisper-medium for
code-switched Egyptian Arabic + English speech — the register used in Arab-world
university lectures, where dialectal Arabic and English technical terms alternate mid-sentence.
A
CTranslate2 INT8 build for fast CPU/edge inference is available at
whisper-medium-arabic-codeswitched-ct2.
Base Whisper tends to transliterate or drop English technical terms in Arabic speech
("embedding" → "إمبدنغ" or omitted) and pushes dialect toward Modern Standard Arabic.
For downstream retrieval over lecture content, the original surface form matters — so the
model is trained to keep code-switching intact.
Not intended for: high-stakes, legal, or medical transcription without human review.
1from transformers import WhisperProcessor, WhisperForConditionalGeneration
2import librosa
3
4proc = WhisperProcessor.from_pretrained("Seif-Eldeen-Sameh/whisper-medium-arabic-codeswitched")
5model = WhisperForConditionalGeneration.from_pretrained("Seif-Eldeen-Sameh/whisper-medium-arabic-codeswitched")
6
7audio, sr = librosa.load("clip.wav", sr=16000, mono=True)
8feats = proc(audio, sampling_rate=16000, return_tensors="pt").input_features
9ids = model.generate(feats, language="ar", task="transcribe")
10print(proc.batch_decode(ids, skip_special_tokens=True)[0])
1from faster_whisper import WhisperModel
2m = WhisperModel("Seif-Eldeen-Sameh/whisper-medium-arabic-codeswitched-ct2",
3 device="cpu", compute_type="int8")
4segs, _ = m.transcribe("clip.wav", language="ar", beam_size=1, vad_filter=True)
5print(" ".join(s.text for s in segs))
Measured on a held-out slice of
asr_codeswitched_dataset with
jiwer WER, light text normalization (lowercase, diacritic + punctuation strip, no MSA folding). Reproduce with
eval/evaluation.ipynb.
The CT2 INT8 build is ~4× smaller than the original FP32 (~380 MB vs ~3 GB) and ~33× faster on T4 GPU vs free-tier CPU.
1@misc{muhadara_whisper_2026,
2 author = {Seif Eldeen Sameh},
3 title = {Whisper-medium Arabic/English Code-Switched ASR},
4 year = {2026},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/Seif-Eldeen-Sameh/whisper-medium-arabic-codeswitched}}
7}