HADRA-TTS (v1.0 Specification)
A Dual-Tier Moroccan Darija Speech Architecture combining Flow-Matching DiT for studio-grade acoustic fidelity, VITS ONNX for sub-50ms conversational turns, and 0ms pre-synthesized Opus caching.
Table of Contents
1. The Three-Tier Routing System
Rather than forcing a single model across contradictory latency-quality requirements, HADRA implements a coordinated 3-tier routing engine:
24 pre-synthesized Opus clips at NFE 32. Fuzzy-matched (RapidFuzz ratio ≥ 90%) for instant conversational greetings, confirmations, and fillers.
336M Diffusion Transformer, 22 layers, 1024-dim, Vocos 24kHz. Inpainting mel canvas conditioned on curated 4-6s golden reference clips.
Single feedforward pass, ONNX-native, zero ODE numerical integration. Dedicated to real-time voice-to-voice conversation loops.
2. Flow-Matching ODE & The NFE-16 Sweet Spot
In Flow-Matching Conditional Vector Fields, the audio trajectory is integrated via ODE. While NFE=8 causes severe under-integration of fine spectral detail (slurring pharyngeals and uvulars like ح, خ, ق, ع), NFE=16 with Sway Sampling achieves ~95% of NFE-32 fidelity:
nfe_step = 16
sway_sampling_coef = -1.0 # Front-loads early trajectory curvature
cfg_strength = 2.0
truncated_cfg_ratio = 0.55 # Disables CFG after 55% steps to cut compute 28%
3. DODa Dataset & Canvas Infill Hygiene
Unlike cross-attention models, F5-TTS prepends reference audio directly into the mel-canvas and text into character embeddings. Therefore, prompt hygiene directly determines synthesis stability:
- Golden Length: 4.0 to 6.0 seconds (below 2.5s timbre destabilizes; above 8s wastes compute).
- Silence Trimming: Hard trimming (< 50ms leading/trailing) to eliminate hallucinated pauses.
- SNR & Reverb: Strict studio SNR > 20 dB with zero room reflections.
- Intonation: Natural falling sentence cadence at medium tempo.
4. Real CPU Inference Benchmarks
| Engine / Precision | NFE Steps | RTF | Quality Grade |
|---|---|---|---|
| PyTorch FP32 Baseline | NFE = 32 | 10.60 | Studio (Pristine) |
| ⚡ AMX-BF16 + Sway (-1.0) | NFE = 16 | 3.40 (~14s) | Studio (95% of NFE-32) |
| 🚀 Piper VITS ONNX | 1 Pass | < 0.05 (30ms) | Realtime Conversational |
| ⚡ Instant Opus Cache | 0 | 0.00 (0.01ms) | Lossless Master |
5. Citation & BibTeX
@misc{hadra_darija_tts_2026,
title={Habibi-TTS-DODa-Darija: Open-Source Moroccan Darija Flow-Matching Voice Model},
author={Hadra Open Initiative and Contributing Medical Student},
year={2026},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/Jip7e/habibi-tts-doda-darija}},
note={Fine-tuned on DODa Moroccan Arabic Dataset (12,105 Studio Utterances)}
}