whisper-algerian-darja-medium API & Inference Endpoint | FriendliAI
README
License: mit
Overview
touati-kamel/whisper-algerian-darja-medium is an Automatic Speech Recognition (ASR) model specifically fine-tuned for Algerian Arabic (Darja / الدارجة الجزائرية).
Built on top of OpenAI's Whisper Medium (openai/whisper-medium, 769M base parameters / 833M total parameters), this model incorporates parameter-efficient LoRA adapters trained with 4-bit quantization (QLoRA) over a comprehensive sequential 3-phase curriculum covering conversational podcasts, spontaneous storytelling, and cultural narratives from the OddAdmix Algerian speech collection.
Key Highlights
Native Algerian Dialect Adaptation: Exceptional comprehension of authentic Algerian Darja vocabulary, morphology, fast colloquial speech, and code-mixed expressions.
Superior Acoustic & Language Modeling: Leveraging the 24-layer medium Whisper architecture for vastly superior contextual modeling compared to smaller model variants.
Parameter-Efficient LoRA (PEFT): Trained on 69.21M parameters (8.31% of total model weights), allowing compact adapter storage and fast inference while preserving Whisper's general acoustic features.
Low Error Rates: Achieved 0.34% WER on storytelling evaluation subsets, 0.68% WER on conversational podcast subsets, and 0.95% WER on cultural narratives.
Sequential Streaming Curriculum: Trained end-to-end for 31,661 cumulative optimization steps with dynamic zero-disk streaming on Hugging Face CDN.
Evaluation & Benchmark Results
The model was evaluated iteratively across the three domain splits using Word Error Rate (WER %) and Cross-Entropy Evaluation Loss with Arabic dialect text normalization:
Table with columns: Phase, Domain / Dataset, Epochs / Steps, Learning Rate, Best WER (%), Final Eval Loss
Cumulative Training Progress: Total training ran for 31,661 cumulative optimization steps with cosine annealing learning rate schedules and automatic best-adapter preservation per phase.
Comparison: Whisper Small vs. Whisper Medium
Table with columns: Benchmark Dataset, Whisper Small (244M) WER, Whisper Medium (769M) WER, Relative Improvement
Complete Normalization Function (Recommended for Evaluation)
To align with the training evaluation standard, use the following text normalizer:
python
import reimport string_ARABIC_DIACRITICS = "\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670"_TATWEEL = "\u0640"_PUNCT_MAP = {ord(c): None for c in string.punctuation + "\u060C\u061B\u061F\u00AB\u00BB"}def normalize_darja_text(text: str) -> str: if not text: return "" # Strip diacritics & tatweel text = text.translate({ord(c): None for c in _ARABIC_DIACRITICS}) text = text.replace(_TATWEEL, "") # Normalize Alef and Yaa text = text.replace("\u0625", "\u0627").replace("\u0623", "\u0627").replace("\u0622", "\u0627") text = text.replace("\u0649", "\u064A") # Remove punctuation text = text.translate(_PUNCT_MAP) # Collapse whitespace return " ".join(text.split()).strip()
Training Hyperparameters & Setup
Table with columns: Hyperparameter, Value
Hyperparameter
Value
Base Model
openai/whisper-medium (769M params)
Quantization
4-bit NF4 (BitsAndBytesConfig)
Hardware
1x NVIDIA Tesla T4 GPU (16 GB VRAM)
Per-Device Batch Size
4
Gradient Accumulation Steps
8 (Effective Batch Size = 32)
Mixed Precision
FP16 (fp16=True)
Intended Uses & Limitations
Intended Uses
High-accuracy speech-to-text transcription for Algerian podcasts, YouTube content, interviews, and media.
Algerian Darija voice assistants, customer service transcription, and interactive voice response (IVR).
Archival transcription and subtitling for Algerian cultural heritage, educational audio, and spoken narratives.
Limitations & Biases
Code-Switching: Algerian Darja frequently blends Arabic with French and Berber/Tamazight loanwords. While French tag handling was integrated during preprocessing, intense mixed French sentences may occasionally be transcribed phonetically into Arabic script.
Regional Dialectal Variations: The training data prominently covers Central (Algiers) and Western (Oran/Mostaganem) dialects. Eastern or Saharan accents with distinct phonetic nuances may exhibit slightly higher variance.
Extreme Background Noise: Best results are achieved on clear speech. Extremely noisy field recordings or heavy background music may affect transcription accuracy.
@misc{touati2026whisper_algerian_darja_medium, author = {Kamel Touati}, title = {Whisper Medium Fine-Tuned for Algerian Arabic (Darja)}, year = {2026}, publisher = {Hugging Face}, journal = {Hugging Face Hub}, howpublished = {\url{https://huggingface.co/touati-kamel/whisper-algerian-darja-medium}}}
bibtex
@article{radford2022whisper, title={Robust Speech Recognition via Large-Scale Weak Supervision}, author={Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya}, journal={arXiv preprint arXiv:2212.04356}, year={2022}}