tiny-voca-ar v0.1.0
tiny-voca-ar is a small Modern Standard Arabic text-to-speech model with 4,537,867 parameters. It is an Arabic port of tiny-voca by Muhammed Nazeem (Apache-2.0). It uses the same model and the same training recipe. The language-specific parts are new: a rule-based front end that turns fully diacritized text into phonemes, an Arabic teacher, and Arabic screening.
The model was trained from scratch, with no pre-trained weights, for 79,955 steps. The teacher made 6,179 clips (about 12.12 hours of synthetic speech) that passed every screening check. The model trained on 5,968 of them; the rest failed phoneme alignment or were held out for validation.
Not cleared for client use. The voice-rights question in Reference voice is still open. A native speaker has not yet listened through gate H4 (see Limitations).
| Parameters | 4,537,867 |
| Voice | M2, one male voice (see Reference voice) |
| Output | 24 kHz mono |
| Input | Fully diacritized Modern Standard Arabic. Digits, phone numbers, dates, order ids and IBANs are spelled out by the front end |
| Pretrained weights in the model | None |
| Licence | Apache-2.0 (see NOTICE.md for the CC BY 4.0 attributions) |
| Dataset | abdullah/tiny-voca-ar |
Files
| File | Contents |
|---|---|
tiny-voca-ar.pt |
PyTorch inference checkpoint, float32 |
onnx/model.onnx |
ONNX export, checked against the PyTorch model |
config.json |
Model settings, phoneme inventory, voices |
code/tiny_voca_ar-0.2.0-py3-none-any.whl |
The tiny_voca Python package (front end, model, inference) at the commit that trained this model |
samples/ |
The audio on this page |
evaluation.json |
Every number in this card, with the per-kind breakdown |
NOTICE.md |
Attributions for the CC BY 4.0 material |
SHA256:
tiny-voca-ar.pt:87711559d78ada358dcaf3686c83b9385db288edb7c78675a1fd0989c13db6caonnx/model.onnx:e15b25eb8164fc5e575472f58c6edf4fa141245cf8faa254427c232a449944e9
Samples
| Text | M2 |
|---|---|
| ู ูุฑูุญูุจูุงุ ุฃูููุง ุฌูุงููุฒู ู ูุชูู ุดูุฆูุชู. | |
| ููุจูุฏูู ุงูุทููููุณู ููู ุนูู ููุงูู ุตูุงููููุง ุงููููููู ูุ ูููููู ููููุชู ู ูููุงุณูุจู ููููุฒูููุฉู ุทููููููุฉู ููู ุงููุญูุฏููููุฉู. | |
| ุงูุชููุตููู ุจูู ุนูููู ููุงุชูููู 0501234567 ููู ุฃูููู ููููุชู. |
The samples are male (M2) only; the F2 slot is untrained. They were generated at release time from the
released checkpoint, at the default speed of 1.0, so they sound slow. Use --speed 1.3 for a natural pace
(see Limitations).
Usage
python -m venv tva && . tva/bin/activate
pip install "huggingface-hub>=0.34" torch soundfile numpy
hf download abdullah/tiny-voca-ar --revision v0.1.0 --local-dir tiny-voca-ar
pip install tiny-voca-ar/code/tiny_voca_ar-0.2.0-py3-none-any.whl
tiny-voca-speak --checkpoint tiny-voca-ar/tiny-voca-ar.pt --voice M2 --speed 1.3 \
--text "ู
ูุฑูุญูุจูุงุ ุฃูููุง ุฌูุงููุฒู ู
ูุชูู ุดูุฆูุชู." --output hello.wav
From Python:
import soundfile as sf
from tiny_voca.infer import load_model, speak_text
model = load_model("tiny-voca-ar/tiny-voca-ar.pt")
wave, _ = speak_text(model, "ุงูุชููุตููู ุจูู ุนูููู ููุงุชูููู 0501234567 ููู ุฃูููู ููููุชู.", voice="M2", speed=1.3)
sf.write("phone.wav", wave.numpy(), 24000)
Always pass --voice M2. The checkpoint keeps the upstream two-voice layout, but this version was trained on M2
only, so the F2 slot is untrained and makes noise.
The default speed of 1.0 follows the teacher's pace and sounds slow. Set --speed 1.3; it reads at about 13.6
phones per second, the human narrator's pace, with word error rate 0 on the check sentences.
The model reads the diacritics as written. Text without tashkeel is refused (needs_tashkeel). This version has
no diacritizer. Diacritize the text and review it before the model reads it.
Evaluation
The two models read the same 43 sentences of the fixed eval set (tiny_voca.evalset: short, medium, long,
numbers, phone numbers, dates, order ids, and other kinds). No eval sentence is in the training corpus.
| Check | Student (this model) | Teacher (SILMA, same voice) |
|---|---|---|
| Whisper large-v3-turbo word error rate, diacritics stripped | 0.0532 | 0.07 |
| Judge 1: written vowels the phoneme recogniser hears as written | 99.13% (1363/1375) | 98.98% (1361/1375) |
| Judge 2: vowels that agree with a diacritizing Arabic ASR | 98.87% (703/711) | 98.39% (673/684) |
| Digits heard back right (phone numbers and order ids) | 67/67 | 65/67 |
| Harakat minimal pairs (set H3 for the student, set H2 for the teacher) | 98.91% (91/92, 0 undecidable) | 97.83% (90/92, 0 undecidable) |
scripts/release.py checks every release gate before upload:
| Gate | Result | Measured |
|---|---|---|
| digits 100% on phone and order-id cases | pass | 67/67 |
| H3 minimal pairs >= 98% | pass | 91/92 |
| WER within 2 points of the teacher | pass | student 0.0532 vs teacher 0.07 |
How to read these numbers:
- Judge 1 is
facebook/wav2vec2-lv-60-espeak-cv-ft(CTC). A vowel counts as doubtful when another vowel scores better than the written one by more than 1 log unit. It has known false alarms: 3 in 89 clean clips when it was calibrated. - Judge 2 is
NightPrince/stt-arabic-whisper-finetuned-diactires, a Whisper-small that writes tashkeel. Some of its disagreements are spelling conventions, not wrong vowels. - Whisper writes no tashkeel, so a low word error rate shows the words are clear. It does not show the diacritics are right.
- Neither judge can hear shadda or tell ุธ from ุฐ. Both checks are left to the listening gate H4.
Training data
- Text: 80% of the accepted clips read sentences from the human-diacritized transcripts of ClArTTS (CC BY 4.0, Classical Arabic book text). Only the text was used, not the ClArTTS recordings. Structured text (phone numbers, dates, order ids, one-time codes, IBANs, clock times, and amounts) makes up 17% of the clips. It was written for this project from templates. The rest is conversation, questions, support phrases, names, drills, and 65 recorded sentences from the Arabic Speech Corpus (CC BY 4.0).
- Audio: SILMA TTS (
silma-ai/silma-tts, Apache-2.0 weights, MIT code, no restriction on its outputs) read every sentence at 48 sampling steps. SILMA's own number normalizer and diacritizer were turned off, so the teacher read exactly what the front end reads. SILMA says its pretraining data is "public and proprietary". That lineage is not disclosed. The licence covers the weights. - Screening, per clip: duration, speaking rate, and silence. Whisper word error rate of 0.15 or less. Judge 1 on every vowel. Every digit heard back right on phone, order-id, one-time-code, and IBAN clips. A clip that failed got one more try with a new seed. Rejected: 1,550 clips.
- Teacher bake-off: Fish Audio, Arabic-F5-TTS-v2, Chatterbox Multilingual, and Habibi-TTS were rejected on their
licences or output terms. The project's
docs/experiments.md, row E9, gives the details.
Reference voice
The voice is the studio speaker of the Arabic Speech Corpus (Nawar Halabi, 2016, CC BY 4.0). That corpus was recorded with the speaker's consent, for use as a speech corpus. A 14-second studio clip from it was the teacher's reference. SILMA cut it, as it does with any reference longer than 8 seconds, and transcribed the cut itself. The student imitates the teacher's rendering of that voice.
CC BY 4.0 covers copyright. It does not license publicity or personality rights (section 2(b)(1) of the licence). The corpus consent covers recording for a speech corpus. The consent has not been shown to cover cloning the voice for an avatar, and the question is still open. Do not use the model for client work before it is settled.
Limitations
- Modern Standard Arabic only, and only fully diacritized input. No dialects. No diacritizer.
- One voice. The
F2slot is untrained. - The samples on this card are male (
M2) only and play at the default speed of 1.0, so they sound slow. - The default speaking rate is slow: the model learned the teacher's pace, about 9 phones per second against 13.5
for a human narrator. For now, set
--speed 1.3at inference. - Most of the corpus is Classical book text. Conversational and customer-service prosody is sparse.
- The harakat checks are automatic and imperfect (see Evaluation). The listening gate H4 has not run. A native speaker must listen to 100 sentences across the domains before any client use.
- The number rules cover the forms listed in Input. The front end reads other forms plainly or digit by digit. These include currencies beyond plain amounts, ordinals in running text, and mixed scripts.
- A 4.5M-parameter model is not a studio voice. It targets offline and in-browser use.
Credits
- Model and training code: tiny-voca by Muhammed Nazeem, Apache-2.0.
- Teacher: SILMA TTS by SILMA AI, Apache-2.0 weights.
- Text: ClArTTS (Kulkarni et al., Interspeech 2023, arXiv:2303.00069), CC BY 4.0. Arabic Speech Corpus (Halabi, 2016), CC BY 4.0.
- Reference voice: the Arabic Speech Corpus talent, CC BY 4.0.
- Downloads last month
- -