f5tts-algerian-darja
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). Fine-tuned on the **OddAdmix Algerian Speech Collection** — a multi-domain corpus of Algerian Darja spanning three distinct speech registers: - 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](#text-normalization) below) 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 was conducted across **8 Kaggle sessions** from Sep 20–23 2026. Each session resumed automatically from the last uploaded checkpoint on Hugging Face Hub. > **Note**: Kaggle limits GPU sessions to ~12 hours. Each session resumed automatically from `model_last.pt` uploaded 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. > Previous intermediate checkpoints (`model_48000.pt`, `model_48500.pt`) have been removed to reduce repository size. `model_last.pt` is the definitive final model. pip install f5-tts huggingface_hub from huggingface_hub import hf_hub_download import torch from f5_tts.model import CFM, DiT from f5_tts.model.utils import get_tokenizer 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() 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 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() - **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. - **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.pt` on HF Hub — zero training progress was lost between sessions. - **Memory optimizations**: gradient checkpointing (`checkpoint_activations=True`), 8-bit AdamW, `num_workers=0`, periodic `gc.collect()` + `cuda.empty_cache()`. - **Base checkpoint reset**: step/optimizer state stripped from `model_547500_8_18.pt` before fine-tuning to avoid momentum contamination from pre-training. - **Vocab**: Reuses the 2,580-token Arabic vocab from [IbrahimSalah/Arabic-F5-TTS-v2](https://huggingface.co/IbrahimSalah/Arabic-F5-TTS-v2), compatible with Darja phoneme coverage. @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}}, } *Trained by [Kamel Touati](https://huggingface.co/touati-kamel) · ESTIN, Setif, Algeria · September 2026*
Open f5tts-algerian-darja in AIniverse
Compare versions, read real ratings, save to your stack.
Open in App