Instructions to use nsa01n/najdi-tts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- F5-TTS
How to use nsa01n/najdi-tts with F5-TTS:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Habibi-TTS
How to use nsa01n/najdi-tts with Habibi-TTS:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Najdi-TTS
Najdi Arabic text-to-speech in one consistent Najdi voice. Najdi-TTS is the Saudi model of Habibi-TTS fine-tuned on 28.4 hours of Najdi speech in a single voice (the Dr. Mohammed corpus). Give it everyday Najdi text, such as «وش أخبارك؟ والله إني مشتاق لك من زمان», and a short clip of that voice, and it reads the text in that voice.
Research model from the Emotional Najdi TTS project (Imam Mohammad Ibn Saud Islamic University). Non-commercial use only (CC BY-NC-SA 4.0).
Before and after
The same new sentences, never seen in training, read with the same reference clip of the Dr. Mohammed voice.
Reference clip (from the Dr. Mohammed dataset, drm_000001):
«وش أخبارك؟ والله إني مشتاق لك من زمان»
| Before: original Habibi-TTS Saudi | After: Najdi-TTS |
|---|---|
«يا شيخ خلنا نطلع البر نهاية الأسبوع ونشب النار ونسوي قهوة»
| Before: original Habibi-TTS Saudi | After: Najdi-TTS |
|---|---|
On 50 held-out sentences of the training voice, speaker similarity to the original recordings rose from 0.605 (original model) to 0.813 (Najdi-TTS), with a character error rate of 0.014.
Getting the best results
Option 1: speak in the Dr. Mohammed voice (recommended)
Najdi-TTS was trained on one voice and sounds best in it. Use a reference clip from the Dr. Mohammed dataset together with its exact transcript:
from importlib.resources import files
from f5_tts.infer.utils_infer import load_model, load_vocoder, preprocess_ref_audio_text
from f5_tts.model import DiT
from habibi_tts.infer.utils_infer import infer_process
from huggingface_hub import hf_hub_download
from omegaconf import OmegaConf
ckpt = hf_hub_download("nsa01n/najdi-tts", "model_40290_ema.safetensors")
vocab = hf_hub_download("nsa01n/najdi-tts", "vocab.txt")
arch = OmegaConf.to_container(OmegaConf.load(str(files("f5_tts").joinpath("configs/F5TTS_v1_Base.yaml"))).model.arch)
model = load_model(DiT, arch, ckpt, mel_spec_type="vocos", vocab_file=vocab)
vocoder = load_vocoder(vocoder_name="vocos")
# reference: a Dr. Mohammed clip and its exact transcript
ref_wav = hf_hub_download("nsa01n/najdi-synthetic-dr-mohammed", "data/train/000/drm_000001.wav", repo_type="dataset")
ref_audio, ref_text = preprocess_ref_audio_text(ref_wav, "أبوي يصحى قبل الفجر ويشغل الدلة قبل لا يصحى أحد")
wav, sr, _ = infer_process(ref_audio, ref_text, "وش أخبارك؟ والله إني مشتاق لك من زمان", model, vocoder,
mel_spec_type="vocos", nfe_step=32)
Any other clip from the dataset works the same way: pass its audio and the text field from metadata.jsonl.
Tips:
- The transcript must match the reference audio exactly, or the output drifts.
- Write numbers as words (خمسة وتسعين, not ٩٥).
- One-word phrases are too short for the model's length estimate; give them at least about one second
(
fix_duration= reference length + 1.0).
Option 2: speak in other voices (the mixing formula)
Because the training data had a single speaker, Najdi-TTS pulls other reference voices toward the Dr. Mohammed voice. To copy a different voice, mix Najdi-TTS with the original Habibi-TTS Saudi model:
θ_mixed = α · θ_Najdi-TTS + (1 − α) · θ_original
Every weight is a weighted average of the two models. α = 1 is Najdi-TTS, α = 0 is the original model, and values in between move gradually from one to the other. We measured the trade-off on 50 natural Najdi test items, each with a different real speaker as the reference:
| α | Similarity to the reference speaker ↑ | Similarity to the training voice | Dialect score | CER ↓ |
|---|---|---|---|---|
| 0 (original) | 0.698 | 0.108 | 0.757 | 0.060 |
| 0.25 | 0.673 | 0.152 | 0.754 | 0.062 |
| 0.5 | 0.587 | 0.219 | 0.763 | 0.063 |
| 0.75 | 0.404 | 0.365 | 0.749 | 0.063 |
| 1 (Najdi-TTS) | 0.288 | 0.460 | 0.761 | 0.072 |
α = 0.25 keeps almost all of the voice cloning. Build the mixed checkpoint with the included script and
load it in place of model_40290_ema.safetensors:
python interpolate.py --alpha 0.25 --out najdi-tts-a0.25.safetensors
Example with a female voice the model was not trained on, sentence «يا شيخ خلنا نطلع البر…»:
| Reference voice | α = 0 | α = 0.25 | α = 1 |
|---|---|---|---|
| similarity to this voice | 0.77 | 0.78 | 0.27 |
Evaluation
173 natural Najdi clips from 13 SADA television shows, reviewed by a native speaker; each item read in the voice of its own real speaker (automatic speech length, 32 steps, seed 0). Mean (95% CI).
| Model | CER ↓ | Dialect score P(dialect) ↑ | Speaker similarity ↑ | UTMOS |
|---|---|---|---|---|
| Natural recordings | 0.105 | 0.819 | – | 1.84 |
| Original Habibi-TTS Saudi | 0.071 (0.054–0.089) | 0.745 (0.716–0.773) | 0.717 (0.700–0.733) | 1.73 |
| Najdi-TTS | 0.080 (0.063–0.097) | 0.763 (0.737–0.786) | 0.315 (0.297–0.334) | 2.91 |
CER: Cohere Transcribe Arabic. P(dialect): a dialect-versus-MSA classifier trained on SADA; it does not separate Najdi from other Saudi dialects. Speaker similarity: ECAPA-TDNN, output against the reference clip. UTMOS is English-trained and secondary; it favours clean studio audio.
Intelligibility and dialect score stay at the level of the original model, which already speaks Saudi Arabic. The change is the voice: Najdi-TTS speaks in the Dr. Mohammed voice, which is why Option 1 gives the best results and Option 2 exists for other voices.
Files
| File | What |
|---|---|
model_40290_ema.safetensors |
Najdi-TTS weights (EMA, update 40,290 of 40,290, 102 epochs) |
vocab.txt |
Habibi-TTS Saudi character vocabulary (unchanged) |
interpolate.py |
builds a mixed checkpoint for Option 2 |
base.yaml, data_summary.json |
training settings and data split |
samples/ |
the audio on this page |
Training
Habibi-TTS Saudi (Specialized/SAU/model_200000, an F5-TTS v1 model, 337 M parameters) fine-tuned on 20,285
clips (28.43 h) of synthetic Najdi speech in one cloned voice, 200 clips held out. Learning rate 1e-5 with
1,000 warmup updates and linear decay, batches of 25,600 mel frames, bf16, 40,290 updates on one H100
(about 4.9 h).
Limitations
- One training voice: other voices are pulled toward it (use Option 2).
- The text has no diacritics, so ambiguous words such as ميت (mayyit) follow the model's guess.
- No listening test with native speakers yet; the dialect score is automatic.
License
CC BY-NC-SA 4.0, inherited from Habibi-TTS. Research and non-commercial use only; derivatives must keep the same license.
- Downloads last month
- 19