F5-TTS — Algerian Arabic (Darja) Fine-Tune
The first open-source F5-TTS model fine-tuned for Algerian Arabic (Darja / الدارجة الجزائرية), trained across ~399 hours of multi-domain dialectal speech on a single NVIDIA T4 GPU (16 GB VRAM).
Model Summary
| Property | Value |
|---|---|
| Base Model | IbrahimSalah/Arabic-F5-TTS-v2 (547,500-step Arabic checkpoint) |
| Architecture | F5-TTS / DiT (dim=1024, depth=22, heads=18, conv_layers=8) |
| Language | Algerian Arabic (Darja) + French/Berber code-switching |
| Sample Rate | 24,000 Hz |
| Vocabulary | 2,580 Arabic tokens |
| Total Training Steps | 48,574 updates (8 Kaggle sessions, Sep 20–23 2026) |
| Final Training Loss | 0.4950 (batch cross-entropy) |
| Hardware | NVIDIA Tesla T4 (16 GB VRAM) |
| Best Checkpoint | model_last.pt — the only session that completed normally |
Training Dataset
Fine-tuned on the OddAdmix Algerian Speech Collection — a multi-domain corpus of Algerian Darja spanning three distinct speech registers:
| Subset | Domain | Raw Utt. | Filtered Utt. | Duration |
|---|---|---|---|---|
| Kahwa Podcast | Conversational / Spontaneous | 23,264 | 23,264 | ~110h |
| Loubna Stories | Expressive Narratives | 48,590 | 41,301 | ~237h |
| Rawi Folklore | Cultural Oral Folklore | 5,296 | 4,501 | ~52h |
| Total | Multi-Domain | 77,150 | 69,066 | ~399h |
Data Preprocessing
- Resampled to 24,000 Hz mono float32 on-the-fly (streaming, no local disk)
- Duration filter: 2.0s ≤ duration ≤ 12.0s
- Character density filter: 1.0–25.0 chars/sec
- ~85% utterance retention rate after quality filtering
- Darja-aware text normalization (see Text Normalization below)
Training Configuration
| Hyperparameter | Value |
|---|---|
| Learning Rate | 2×10⁻⁵ (peak) |
| LR Schedule | Cosine annealing with 2,000-step warmup |
| Total Updates | 48,574 |
| Batch Size | 2,000 mel-frames / GPU |
| Gradient Accumulation | 6 steps (effective ~12,000 frames) |
| Max Grad Norm | 1.0 |
| Optimizer | AdamW 8-bit (bitsandbytes) |
| Mixed Precision | FP16 |
| Save Interval | Every 500 updates |
| GPU | NVIDIA Tesla T4 (16 GB VRAM) |
| Platform | Kaggle (background run, multi-session) |
| Monitoring | Weights & Biases — k_touati-estin/f5tts-algerian-darja |
Architecture (DiT 8_18 config)
model_cfg = dict(
dim=1024,
depth=22,
heads=18,
ff_mult=2,
text_dim=512,
text_mask_padding=False,
conv_layers=8,
pe_attn_head=1,
checkpoint_activations=True, # gradient checkpointing for T4 VRAM
)
mel_spec_kwargs = dict(
n_fft=1024,
hop_length=256,
win_length=1024,
n_mel_channels=100,
target_sample_rate=24000,
mel_spec_type="vocos",
)
Training Sessions Log
Training was conducted across 8 Kaggle sessions from Sep 20–23 2026. Each session resumed automatically from the last uploaded checkpoint on Hugging Face Hub.
| Session | Run ID | Date | Steps Reached | Final Loss | Status |
|---|---|---|---|---|---|
| 1 | wxcxx3mi | Sep 20 | 0 | — | Setup/env error |
| 2 | ymp61rc4 | Sep 20 | 2 | 1.0581 | Setup/env error |
| 3 | cknieh8f | Sep 20 | 969 | 0.4266 | Kaggle time limit |
| 4 | m2zoj7ak | Sep 20 | 0 | — | Setup/env error |
| 5 | hniwvpbu | Sep 21 | 13,214 | 0.9916 | Kaggle time limit |
| 6 | gyrlliys | Sep 22 | 26,014 | 1.1612 | Kaggle time limit |
| 7 | zyah6mu2 | Sep 22 | 38,865 | 0.4460 | Kaggle time limit |
| 8 | tk464wii | Sep 23 | 48,574 | 0.4950 | Training complete |
Note: Kaggle limits GPU sessions to ~12 hours. Each session resumed automatically from
model_last.ptuploaded to HF Hub, allowing uninterrupted multi-session training. The wandb "crashed" status reflects Kaggle's process termination, not training errors — all sessions ran normally until the time limit.
Repository Files
| File | Description |
|---|---|
model_last.pt | Best/final model — step 48,574, the only session that completed |
last-checkpoint/ | Kaggle async sync mirror of model_last.pt |
Previous intermediate checkpoints (
model_48000.pt,model_48500.pt) have been removed to reduce repository size.model_last.ptis the definitive final model.
Inference
Install
pip install f5-tts huggingface_hub
Load Model
from huggingface_hub import hf_hub_download
import torch
from f5_tts.model import CFM, DiT
from f5_tts.model.utils import get_tokenizer
# Download weights and vocab
ckpt_path = hf_hub_download("touati-kamel/f5tts-algerian-darja", "model_last.pt")
vocab_path = hf_hub_download("IbrahimSalah/Arabic-F5-TTS-v2", "vocab.txt")
vocab_char_map, vocab_size = get_tokenizer(vocab_path, "custom")
model = CFM(
transformer=DiT(
dim=1024, depth=22, heads=18, ff_mult=2,
text_dim=512, text_mask_padding=False,
conv_layers=8, pe_attn_head=1,
text_num_embeds=vocab_size, mel_dim=100,
),
mel_spec_kwargs=dict(
n_fft=1024, hop_length=256, win_length=1024,
n_mel_channels=100, target_sample_rate=24000,
mel_spec_type="vocos",
),
vocab_char_map=vocab_char_map,
)
ckpt = torch.load(ckpt_path, map_location="cpu", weights_only=False)
model.load_state_dict(ckpt["ema_model_state_dict"], strict=False)
model.eval()
CLI Inference
f5-tts_infer-cli \
--ckpt_file model_last.pt \
--vocab_file vocab.txt \
--ref_audio reference_darja.wav \
--ref_text "واش راك، كلشي مزيان؟" \
--gen_text "النص اللي تبغي تولدو بالدارجة الجزائرية" \
--output_dir ./output
Text Normalization
Apply this normalization to input text before inference (same pipeline used during training):
import re
_FR_TAG_RE = re.compile(r"\[\s*(?:French|FR)\s*:\s*(.*?)\]", re.IGNORECASE)
_BRACKET_RE = re.compile(r"\[.*?\]|<.*?>|\(.*?\)")
_NOISE_CHARS = re.compile(r"[*#@~_\^&%$+=/\\|{}\[\]`\"«»]")
def normalize_darja(text: str) -> str:
text = _FR_TAG_RE.sub(r"\1", text) # expand [French:...] tags
text = _BRACKET_RE.sub("", text) # strip <laugh>, [FR:...] etc.
text = _NOISE_CHARS.sub("", text) # strip noise characters
text = text.replace("\u0640", "") # Kashida elongation
text = text.replace("\u0625", "\u0627") # إ → ا
text = text.replace("\u0623", "\u0627") # أ → ا
text = text.replace("\u0622", "\u0627") # آ → ا
text = text.replace("\u0649", "\u064A") # ى → ي (Alef Maqsura → Yaa)
return " ".join(text.split()).strip()
Dialect Coverage
| Register | Source | Characteristics |
|---|---|---|
| Conversational | Kahwa Podcast | Fast-paced spontaneous speech, French/Darja code-switching, colloquial idioms |
| Expressive Narrative | Loubna Stories | Rich emotional prosody, theatrical delivery, native Darja vocabulary |
| Cultural Folklore | Rawi | Traditional oral storytelling, regional dialectal expressions, proverbs |
Limitations
- Single-speaker bias: The OddAdmix corpus derives from a small number of speakers; the model may reflect their vocal characteristics.
- Orthographic variation: Algerian Darja lacks a standardized script; non-standard orthography (e.g.,
ڨvsقfor the Algerian gaf) may affect quality. - Domain gap: Trained on clean podcast/storytelling audio — noisy or reverberant environments may reduce naturalness.
- Code-switching: French/Darja mixing works best with Latin-script French words; full Arabic transliteration of French may confuse the model.
Training Notes
- Multi-session strategy: Kaggle GPU sessions are limited to ~12 hours. Training was split across 8 sessions; each new session auto-resumed from
model_last.pton HF Hub — zero training progress was lost between sessions. - Memory optimizations: gradient checkpointing (
checkpoint_activations=True), 8-bit AdamW,num_workers=0, periodicgc.collect()+cuda.empty_cache(). - Base checkpoint reset: step/optimizer state stripped from
model_547500_8_18.ptbefore fine-tuning to avoid momentum contamination from pre-training. - Vocab: Reuses the 2,580-token Arabic vocab from IbrahimSalah/Arabic-F5-TTS-v2, compatible with Darja phoneme coverage.
Citation
@misc{touati2026f5tts_darja,
author = {Kamel Touati},
title = {{F5-TTS Fine-Tuned for Algerian Arabic (Darja)}},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/touati-kamel/f5tts-algerian-darja}},
}
Related Resources
| Resource | Link |
|---|---|
| Whisper ASR (Algerian Darja — Medium) | touati-kamel/whisper-algerian-darja-medium |
| Whisper ASR (Algerian Darja — Small) | touati-kamel/whisper-algerian-darja-small |
| Base TTS Model | IbrahimSalah/Arabic-F5-TTS-v2 |
| WandB Training Logs | k_touati-estin/f5tts-algerian-darja |
| F5-TTS Framework | SWivid/F5-TTS |
Trained by Kamel Touati · ESTIN, Setif, Algeria · September 2026