File size: 8,738 Bytes
2a7158b fd42623 2a7158b 7707d29 2a7158b 7707d29 2a7158b e529f71 2a7158b 30da3c1 2a7158b fd42623 2a7158b 7707d29 2a7158b 7707d29 6f44825 7707d29 6f44825 7707d29 6f44825 7707d29 6f44825 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | ---
language: [ar]
license: apache-2.0
library_name: onnxruntime
pipeline_tag: text-to-speech
tags:
- text-to-speech
- tts
- speech-synthesis
- arabic
- msa
- modern-standard-arabic
- tiny-voca
- onnx
- cpu
- small-model
- trained-from-scratch
datasets: [oddadmix/msa-duplex-assistant-tts]
---
# tiny-voca-arabic
A **4.5M-parameter** Modern Standard Arabic (فصحى) text-to-speech model, trained **from scratch** with the
[tiny-voca](https://huggingface.co/n4ze3m/tiny-voca) architecture and a new Arabic phonetic front end.
The waveform generator is included: text in, 24 kHz audio out, about 200× real time on two CPU threads.
> **Based on [tiny-voca](https://huggingface.co/n4ze3m/tiny-voca) by Muhammed Nazeem ([@n4ze3m](https://huggingface.co/n4ze3m)).**
> This model uses the original tiny-voca architecture and training code
> ([github.com/n4ze3m/tiny-voca](https://github.com/n4ze3m/tiny-voca), Apache-2.0). No tiny-voca weights were reused:
> it was trained from scratch on Arabic data. The changes are listed under [Changes from tiny-voca](#changes-from-tiny-voca).
[Demo](https://huggingface.co/spaces/oddadmix/tiny-voca-arabic) ·
[Dataset](https://huggingface.co/datasets/oddadmix/msa-duplex-assistant-tts)
| | |
|---|---|
| Parameters | 4,531,723 (18 MB PyTorch, 21 MB ONNX) |
| Voice | one synthetic MSA voice (`a000`) |
| Audio | 24 kHz mono |
| Training data | 45,737 utterances, 89 h |
| Training | 104k steps, 2.6 h on one GPU |
## Samples
| Text | Audio |
|---|---|
| مرحبًا بكم، هذا نموذج صغير لتحويل النص إلى كلام باللغة العربية الفصحى. | [sample-0.wav](samples/sample-0.wav) |
| تقع مدينة القاهرة على ضفاف نهر النيل، وهي من أكبر المدن في العالم العربي. | [sample-1.wav](samples/sample-1.wav) |
| هل يمكنك أن تخبرني عن حالة الطقس غدًا؟ أريد أن أخرج في نزهة مع أصدقائي. | [sample-2.wav](samples/sample-2.wav) |
| يبلغ عدد سكان المدينة 2,500,000 نسمة، ونسبة الشباب فيها 35%. | [sample-3.wav](samples/sample-3.wav) |
| العلم نور، والجهل ظلام. ومن جدّ وجد، ومن زرع حصد. | [sample-4.wav](samples/sample-4.wav) |
## How it works
1. **Numbers** are read as MSA words (`code/numbers.py`).
2. **Diacritization** with [CATT](https://github.com/abjadai/catt) (encoder-decoder, Apache-2.0).
3. **Phonemes** from a rule-based MSA converter (`code/arabic_frontend.py`), 49 symbols:
sun-letter assimilation, hamzat al-wasl elision and helping vowels, long vowels shortened before
wasl, shadda as a doubled consonant, tanween, tāʾ marbūṭa (`t` inside a phrase, dropped at a pause),
pausal forms at punctuation, emphatic backing of /a/ next to ص ض ط ظ ق (and after خ غ ر), dark lām in
الله, and stress from syllable weight.
4. **Acoustic model + synthesizer**: the tiny-voca network predicts durations, pauses, pitch, voicing and
energy, then a source-filter synthesizer makes the waveform. There is no separate neural vocoder.
**Case endings.** Speakers often drop mid-sentence iʿrāb. While aligning the training data, each
mid-phrase case ending was kept or removed per clip according to which version the audio supports
(a CTC likelihood comparison), so the model learned from what was actually said. About half were dropped.
## Evaluation
Whisper large-v3 transcripts of generated speech against the input text (diacritics and punctuation removed).
Held-out sets come from dialogues not seen in training; the new sentences appear in no split.
| Set | Clips | CER | WER | CER of the original recordings |
|---|---|---|---|---|
| Validation | 25 | 0.5% | 1.2% | 1.0% |
| Test | 25 | 1.8% | 2.4% | 2.1% |
| New sentences | 8 | 0.3% | 1.4% | — |
Most remaining errors are Whisper writing spoken numbers as digits. Generated durations are within 3% of
the recordings and pitch variation matches (3.6 semitones).
### Open TTS Leaderboard
As of the **2026-11-24** leaderboard (v1.7.3), this model is listed on the [Open TTS Leaderboard](https://huggingface.co/spaces/hf-audio/open_tts_leaderboard). Versioned, Arabic-specific results: **https://huggingface.co/spaces/hf-audio/open_tts_leaderboard?version=1.7.3&languages=ar**
It ranks **1st of 13 Arabic models** on the fixed-voice leaderboard. WER and RTFx are the composite across the MiniMax and ZTTS2-Eval-Mini (clean) benchmarks:
| Rank | Model | WER ↓ | RTFx ↑ | Size (B) |
|---:|---|---:|---:|---:|
| **1** | **oddadmix/tiny-voca-arabic** | **3.40** | **6.5** | **0.0266** |
| 2 | Supertone/supertonic-3 | 4.45 | 67.7 | 0.1 |
| 3 | fishaudio/drama-3 | 4.58 | 24.9 | 35.0 |
<sub>Generated on CPU (H200 host CPU); RTFx is not directly comparable with GPU-generated models. The size includes the CATT diacritizer front-end, and its per-phrase overhead is counted in RTFx.</sub>
## Usage (ONNX Runtime)
```bash
pip install onnxruntime numpy soundfile tqdm
hf download oddadmix/tiny-voca-arabic --local-dir tiny-voca-arabic
```
The front end in `code/` uses the CATT diacritizer; the
[demo Space](https://huggingface.co/spaces/oddadmix/tiny-voca-arabic/tree/main) contains it ready to run
(`app.py`, `tiny_voca_ar/`, `catt_tashkeel/`). Minimal call:
```python
import numpy as np, onnxruntime as ort, soundfile as sf
from tiny_voca_ar.numbers import expand_numbers
from tiny_voca_ar.text import phonemize
session = ort.InferenceSession("tiny-voca-arabic/onnx/model.onnx", providers=["CPUExecutionProvider"])
phones = phonemize(expand_numbers("مرحبًا بكم في عالم الذكاء الاصطناعي."))
one = lambda v: np.array([v], dtype=np.float32)
audio, durations = session.run(None, {
"tokens": np.array([phones.ids], dtype=np.int64), "stress": np.array([phones.stress], dtype=np.int64),
"voice": np.array([0], dtype=np.int64), "speed": one(1.0), "pitch_shift": one(0.0), "pitch_range": one(1.0)})
sf.write("hello.wav", audio[0], 24000)
```
Inputs: `tokens`/`stress` int64 `[1, N]`, `voice` int64 `[1]`, `speed` (1 = as predicted, larger is
faster), `pitch_shift` (added to log F0; 0.058 ≈ one semitone), `pitch_range` (scales intonation). Read
long text one sentence at a time (at most 500 phonemes / 32 s per call) and join the audio.
The PyTorch checkpoint `tiny-voca-arabic.pt` loads with the tiny-voca code
(`tiny_voca.infer.load_model`) using the Arabic `text.py` / `arabic_frontend.py` from `code/`.
## Limitations
- One voice, Modern Standard Arabic only; dialectal text is read with MSA rules.
- Pronunciation follows the automatic diacritization. When CATT picks the wrong reading (for example
نَمَوذج instead of نُموذج), the model says it. Add tashkeel yourself to fix a word.
- Latin script, emoji and symbols other than numbers and % are skipped.
- The ص/ط/ض/ظ emphatics are well covered, but the dark lām only appears in الله.
## Training data
[oddadmix/msa-duplex-assistant-tts](https://huggingface.co/datasets/oddadmix/msa-duplex-assistant-tts)
(batches 0–8): single-speaker synthetic MSA speech with scripted assistant dialogue turns. Of 49,793 clips,
45,737 passed alignment quality checks. The voice is synthetic; please tell listeners when audio
they hear was generated.
## License
Apache-2.0.
## Changes from tiny-voca
The architecture is unchanged from tiny-voca 903f940: same network, synthesizer and losses, at the same size. The changes are:
- An Arabic front end that replaces the English phonemizer: CATT diacritization, MSA phoneme rules, a
49-symbol inventory and a number reader.
- One voice instead of two (F2/M2).
- Aligner label mapping for the Arabic emphatics, and per-clip selection of spoken case endings during annotation.
- Training on 89 h of Arabic speech with packed memory-mapped features, plus an Arabic evaluation that uses
Whisper large-v3 CER.
## Credits
- **Original model, architecture and training code:** [tiny-voca](https://huggingface.co/n4ze3m/tiny-voca)
by Muhammed Nazeem ([@n4ze3m](https://huggingface.co/n4ze3m)), Apache-2.0
([code](https://github.com/n4ze3m/tiny-voca)).
- **Diacritizer:** [CATT](https://github.com/abjadai/catt) by Abjad AI, Apache-2.0.
## Citation
If you use this model, please cite:
```bibtex
@software{oddadmix2026tinyvocaarabic,
author = {oddadmix},
title = {tiny-voca-arabic: a 4.5M-parameter Modern Standard Arabic text-to-speech model},
year = {2026},
url = {https://huggingface.co/oddadmix/tiny-voca-arabic},
license = {Apache-2.0}
}
```
Architecture and training code are from [tiny-voca](https://huggingface.co/n4ze3m/tiny-voca) by Muhammed Nazeem (see Credits).
|