Downloads · 30 days
9
14% of all-time downloads
seyhunak/Mezna-TTS-82M
Mezna-TTS-82M is a text-to-speech model from seyhunak. Use it when you need text read aloud. The card lists the license as apache-2.0.
[](LICENSE) [](requirements.txt) [](https://huggingface.co/hexgrad/Kokoro-82M) [](arlexicon.json)
Downloads · 30 days
9
14% of all-time downloads
All-time downloads
64
Public
Repo size
1.8 MB
Likes
0
Public
Click a slice to open those files.
.wav1.2 MB · 68%
From the Hugging Face model README
Emirati (UAE) Arabic text-to-speech — Kokoro-82M fine-tuned for the Gulf/Emirati dialect, with a single natural female voice: Mezna 🌙
Status: repo scaffold + Emirati frontend complete and tested (18/18 pytest). Native-voice samples below use the
ar-AEstand-in voice; Mezna's own fine-tuned weights (kokoro_mezna_82M.pth) land after the training run — see Training.
شو, وايد, عيل, يلس, أبغي, ريوق, مسيد, دياي, فريج, ميلس …)ar_lexicon.json,
add surface_word: diacritized_form to fix new wordsinference.py) + native ar-AE
voice (speak_edge.py) until fine-tuned weights landapp.py with 5 one-click Emirati examplesNative Emirati female voice (ar-AE-FatimaNeural, 24 kHz mono wav).
Click any file to play it on GitHub:
| # | Sample | Arabic 🇦🇪 | English 🇬🇧 | Length |
|---|---|---|---|---|
| 1 | ▶️ mezna_ae_1.wav | هلا، شحالج؟ شو مسوية اليوم؟ | Hi, how are you? What are you up to today? | 4.8s |
| 2 | ▶️ mezna_ae_2.wav | اليوم الجو وايد زين، تبين نسير صوب البحر عقب الريوق؟ | The weather is really nice today — want to head to the beach after breakfast? | 6.1s |
| 3 | ▶️ mezna_ae_3.wav | أبغي أروح الدكان أشتري خضرة وفواكه للبيت. | I want to go to the shop to buy vegetables and fruit for the house. | 5.0s |
| 4 | ▶️ mezna_ae_4.wav | عيل خلنا نتقهوى في الميلس عقب صلاة المغرب. | So let's have coffee in the majlis after Maghrib prayer. | 4.7s |
| 5 | ▶️ mezna_ae_5.wav | الدياي في الفريج يصيح من الصبح، والريوق جاهز. | The chickens in the neighborhood have been crowing since morning, and breakfast is ready. | 5.0s |
Total: ~25s of Emirati speech covering greetings, questions, shopping, majlis
plans, and Bedouin-origin vocabulary (دياي, فريج).
# 1. Environment (system pip is often locked — venv recommended)
python3 -m venv .venv && ./.venv/bin/pip install -r requirements.txt
# NOTE (Python 3.14): install misaki without build deps first:
# ./.venv/bin/pip install --no-deps misaki && ./.venv/bin/pip install spacy
# 2. Native ar-AE voice (needs network) — works TODAY
./.venv/bin/python speak_edge.py "هلا، شحالج؟ شو مسوية اليوم؟" --out out.wav
./.venv/bin/python speak_edge.py --text "..." --out out.mp3 \
--voice ar-AE-HamdanNeural # male voice option
# 3. Offline Kokoro path (needs fine-tuned weights — see Training)
./.venv/bin/python voices/make_voice.py # placeholder pack pre-training
./.venv/bin/python inference.py "هلا، شحالج؟ اليوم الجو وايد زين؟" --out mezna_out.wav
# 4. Tests + demo
./.venv/bin/python -m pytest tests/ -q # 18 passed
./.venv/bin/python app.py # Gradio UI (needs: pip install gradio)
| Use-case | How Mezna helps | Entry point |
|---|---|---|
| 🏪 Shop & service announcements | Mall/store greetings in real Emirati, not MSA — customers hear their own dialect | speak_edge.py / inference.py |
| 📚 Kids' stories & learning apps | Bedtime stories, alphabet and vocabulary apps voiced in the home dialect | inference.py --speed 0.8 |
| 🏛️ Government & majlis kiosks | Service kiosks, queue announcements, and IVR that speak UAE Arabic | batch via synthesize() |
| 🎙️ Podcasts & video voiceovers | Emirati narration for YouTube, reels, and ads without studio time | long-text chunking handles full scripts |
| ♿ Accessibility | Screen-reader-style readout of messages and news for elderly users who prefer dialect | app.py demo |
| 📞 Call centers / IVR | Greetings, menus, and confirmations in a familiar female Emirati voice | speak_edge.py --voice ar-AE-FatimaNeural |
| 🕌 Mosque & community notices | Event reminders and فريج announcements (lexicon covers community vocab) | ar_lexicon.json + synthesize() |
Text → audio in 4 stages:
Arabic text
│ 1. NORMALIZE (mezna_frontend.normalize_text)
│ • ،؛؟ → ,;? • lexicon: شو→شُو, أبغي→أَبْغي
│ • ال-prefix fallback: الدكان→الدُكّان • OOV ة→ه
▼
Normalized text
│ 2. PHONEMIZE (espeak-ng 'ar' via misaki EspeakG2P)
│ هلا → hˈalaː (bundled dylib, no system install needed)
▼
IPA phonemes
│ 3. REMAP (remap_phonemes — Kokoro's 178-token vocab)
│ ħ→ʰ ʕ→ʁ ˤ→ᵊ ̪→∅
▼
Model phonemes
│ 4. SYNTHESIZE (KModel: StyleTTS2 + ISTFTNet, 24 kHz)
│ voice [510,1,256] indexed by phoneme length, per KPipeline
▼
🔊 mezna_out.wav
Ollama runs text LLMs, not TTS voices — so Mezna on Ollama is a split setup:
an Ollama model does the talking (Emirati persona), chat_voice.py voices it.
ollama create mezna -f Modelfile # Emirati persona over a local Arabic LLM
python chat_voice.py "شحالج؟ شو تنصحيني أسوي اليوم في دبي؟" --out reply.wav
# -> Mezna: <reply text> + reply.wav in the ar-AE female voice
To upgrade the brain, change one line in Modelfile
(FROM wamda-3b:latest → e.g. FROM qwen3:8b) and re-run ollama create.
| File | Purpose |
|---|---|
samples/mezna_ae_*.wav | 5 native-voice Emirati samples (24 kHz mono) |
mezna_frontend.py | Emirati frontend: normalize_text, remap_phonemes, frontend, phonemize_ar |
ar_lexicon.json | 68-entry dialect pronunciation lexicon (extensible) |
inference.py | Offline Kokoro CLI: cached model, chunking, coverage warnings |
speak_edge.py | Native ar-AE voice CLI (.mp3 or .wav via ffmpeg) |
app.py | Gradio demo with 5 one-click examples |
Modelfile + chat_voice.py | Ollama Emirati persona + chat-to-voice pipeline |
voices/mezna.pt + make_voice.py | Mezna voicepack [510, 1, 256] (+ placeholder builder) |
config.json | Kokoro config (178-token vocab) |
kokoro_mezna_82M.pth | Fine-tuned weights — lands after training |
tests/ | 18 pytest cases (frontend + inference) |
requirements.txt | Pinned-approach deps (see Python 3.14 note above) |
hexgrad/Kokoro-82M, patched StyleTTS2 recipe.چ, گ where spoken; spell numbers out).mezna_frontend.normalize_text; extend
ar_lexicon.json with surface: diacritized fixes as G2P errors appear.KModel; mean-pool style embeddings → voices/mezna.pt.دياي, فريج), and ؟ question intonation.speak_edge.py needs network access to the Edge TTS service.surface_word: diacritized_form in ar_lexicon.json
(e.g. hear a mispronunciation → fix it → add a pytest case in
tests/test_frontend.py)../.venv/bin/python -m pytest tests/ -q before every PR — keep 18/18 green.hexgrad/Kokoro-82M
(patched StyleTTS2 recipe).ar-AE voices.