/ Модель

Характеристики

Контекст
1 024 токена
Параметры
456 млн
Лицензия
Apache 2.0
Архитектура
whisper · dense
Базовая модель
whisper-medium
Библиотека
transformers
Опубликована
15 апр 2026

whisper-medium-arabic-codeswitched

Распознавание речиАудио → текст

Дообученная Whisper-medium распознаёт речь с переключением между египетским арабским диалектом и английской технической лексикой.

202скачиваний за 30 дней0лайковвеса обновлены28 мая 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Модель Seif-Eldeen-Sameh — дообученная версия OpenAI Whisper-medium для распознавания речи с переключением между египетским арабским диалектом и английским языком. Это плотная encoder-decoder модель Whisper с 455,8 млн параметров; она принимает аудио и выдаёт текст, сохраняя арабскую речь в диалектной форме, а английские технические термины — латиницей.

Модель предназначена для расшифровки лекций, докладов и технических встреч, где арабская речь чередуется с английской терминологией, а также для подготовки транскриптов в конвейерах ASR → RAG. В описанной автором оценке на тестовой выборке WER составил 17,9% против 52,4% у базовой Whisper-medium; это результат на конкретном срезе датасета, а не гарантия для других записей. Для использования опубликованы веса safetensors; лицензия — Apache-2.0.

Обучение проводилось на 34,1 часах аудио и 45 189 фрагментах. Модель рассчитана прежде всего на египетский диалект: качество для диалектов стран Персидского залива, Леванта и Магриба не проверено и может быть ниже. Дальние и сильно зашумлённые записи остаются сложными; длинные аудио без разбиения используют штатную сегментацию Whisper, а галлюцинации на продолжительной тишине требуют отдельной обработки.

Сценарии применения

  • расшифровка лекций на египетском арабском с английскими терминами
  • транскрибация технических докладов и встреч с переключением языков
  • подготовка транскриптов для поиска и RAG-систем
  • распознавание английских терминов в арабской речи

Ограничения

Другие арабские диалекты не проверены и могут распознаваться хуже; дальние и сильно зашумлённые записи остаются сложными. Галлюцинации Whisper на продолжительной тишине требуют отдельной обработки, а очень длинное неразбитое аудио полагается на штатную сегментацию модели.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Whisper-medium · Arabic/English Code-Switched ASR

Fine-tuned openai/whisper-medium (769M params) for code-switched Egyptian Arabic + English speech — the register used in Arab-world university lectures and technical talks, where dialectal Arabic and English technical vocabulary alternate within sentences ("يعني الـ gradient descent بيقلل الـ loss").

A CTranslate2 INT8 build (~4× smaller, runs on CPU, ~33× faster on GPU) is available at whisper-medium-arabic-codeswitched-ct2.

Headline result

ModelWER ↓
openai/whisper-medium (base)52.4 %
This model17.9 %
Absolute reduction−34.5 points

Measured on a held-out, deterministic 1 % test slice of asr_codeswitched_dataset (test_size=0.01, seed=42) using jiwer WER under light normalization (lowercase, diacritic + punctuation strip — no MSA folding so code-switching is preserved as a real evaluation signal). Reproducible from eval/evaluation.ipynb in the project repo.

Why fine-tune

Base Whisper has two failure modes on Arab-world technical speech:

  1. Drops or transliterates English technical terms — "embedding" becomes "إمبدنغ" or vanishes entirely.
  2. Pushes dialect toward Modern Standard Arabic — Egyptian "بيتكلم" becomes MSA "يتحدث".

For any downstream retrieval / RAG system the original surface form matters: the user's query and the indexed transcript have to share a vocabulary. This model is trained to keep code-switching verbatim — dialect stays dialect, English terms stay in Latin script.

Intended use

  • Transcribing code-switched Arabic/English lectures, talks, technical meetings.
  • Upstream component of an ASR → RAG pipeline. See Muhadara RAG for the full system this model was built for.

Not intended for: high-stakes (legal, medical) transcription without human review; non-Egyptian Arabic dialects (Gulf, Levantine, Maghrebi — untested).

Training data

DatasetSeif-Eldeen-Sameh/asr_codeswitched_dataset
Total duration34.1 hours
Examples45,189 clips
Avg / median clip2.7 s / 2.2 s (utterance-level)
SourcesEJUST custom recordings (~32 K clips, transcripts re-processed from all-Arabic back to true code-switching) + MohamedRashad/arabic-english-code-switching (~12 K clips)
Sampling rate16 kHz mono

Training procedure

Hyperparameters

Base modelopenai/whisper-medium (769M params)
Steps6 000
Batch size2 × grad-accum 8 = effective 16
Learning rate1e-5, linear schedule, 500 warmup steps
OptimizerAdamW (fused), β = (0.9, 0.999), ε = 1e-8
Precisionfp16 (mixed)
Selection metricWER on eval split
load_best_model_at_endTrue
Random seed42

Training curve

StepEval lossEval WER
5000.433333.92
10000.350228.53
15000.320726.72
20000.296525.30
25000.271423.28
30000.260823.32
35000.252321.50
40000.246821.40 ← best, loaded at end
45000.250324.13
50000.245127.25
55000.243023.89
60000.245022.95

Why the headline (17.9%) differs from the curve (best 21.4%)

Both are honest numbers, measured on different splits:

  • 21.4 % is the trainer-time validation WER at the best step (4000). This is what load_best_model_at_end selected against.
  • 17.9 % is the held-out 1 % test slice WER measured after training with the eval notebook. The split, normalization conventions, and beam configuration in the eval notebook (beam_size=1, vad_filter=False, same text normalization used downstream by the RAG system) better reflect deployed-system behavior.

The eval notebook is the source of the result reported here; the trainer curve is kept for full transparency.

Usage

Transformers

from transformers import WhisperProcessor, WhisperForConditionalGeneration
import librosa

processor = WhisperProcessor.from_pretrained("Seif-Eldeen-Sameh/whisper-medium-arabic-codeswitched")
model     = WhisperForConditionalGeneration.from_pretrained("Seif-Eldeen-Sameh/whisper-medium-arabic-codeswitched")

audio, sr = librosa.load("clip.wav", sr=16000, mono=True)
features  = processor(audio, sampling_rate=16000, return_tensors="pt").input_features
ids       = model.generate(features, language="ar", task="transcribe")
print(processor.batch_decode(ids, skip_special_tokens=True)[0])

faster-whisper (CT2 INT8 build — recommended for deployment)

For ~4× smaller weights and ~33× speedup on GPU, use the INT8 build:

from faster_whisper import WhisperModel

# GPU
model = WhisperModel(
    "Seif-Eldeen-Sameh/whisper-medium-arabic-codeswitched-ct2",
    device="cuda", compute_type="int8_float16",
)
# or CPU
# model = WhisperModel(..., device="cpu", compute_type="int8")

segments, _ = model.transcribe("clip.wav", language="ar", beam_size=1, vad_filter=True)
print(" ".join(s.text for s in segments))

Latency (CT2 INT8 build · 40.8 s test clip · median of 3 runs)

DeviceWall timeReal-time factor
2 vCPU82.94 s2.03×
T4 GPU2.49 s0.061×

~33× CPU → GPU speedup — the architecture justification for offloading ASR to a serverless GPU in the Muhadara RAG deployment while keeping the frontend on free CPU.

Limitations

  • Egyptian dialect dominant — other Arabic dialects (Gulf, Levantine, Maghrebi) untested and likely to degrade.
  • Far-field / very noisy recordings remain hard; a DeepFilterNet denoising preprocessor was built and rejected (it suppressed the distant main speaker — see the project's design notes).
  • Whisper hallucination on long silences is mitigated downstream via VAD + a 3-gram repetition guard, not in this model itself.
  • Utterance-length training data (avg 2.7 s/clip) — very long unsegmented audio relies on Whisper's native chunking.

Citation

@misc{muhadara_whisper_2026,
  author    = {Seif Eldeen Sameh},
  title     = {Whisper-medium Arabic/English Code-Switched ASR},
  year      = {2026},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/Seif-Eldeen-Sameh/whisper-medium-arabic-codeswitched}}
}

Framework versions

  • Transformers 5.5.4
  • PyTorch 2.10.0+cu128
  • Datasets 4.8.4
  • Tokenizers 0.22.2

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Модель не помещается в память одной GPU (80 ГБ).

Класс архитектуры
WhisperForConditionalGeneration
Ревизия весов
8693f1d

0 моделей