Instructions to use mohammedaly22/Cairo-TTS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Pocket-TTS
How to use mohammedaly22/Cairo-TTS with Pocket-TTS:
from pocket_tts import TTSModel import scipy.io.wavfile tts_model = TTSModel.load_model("mohammedaly22/Cairo-TTS") voice_state = tts_model.get_state_for_audio_prompt( "hf://kyutai/tts-voices/alba-mackenna/casual.wav" ) audio = tts_model.generate_audio(voice_state, "Hello world, this is a test.") # Audio is a 1D torch tensor containing PCM data. scipy.io.wavfile.write("output.wav", tts_model.sample_rate, audio.numpy()) - Notebooks
- Google Colab
- Kaggle
Cairo-TTS ยท ูุงูุฑู
Fast Egyptian Arabic text-to-speech with English code-switching, streaming and zero-shot voice cloning.
It runs on CPU or GPU, starts speaking in under 100 ms on a GPU, and is about 100M parameters.
Highlights
| ๐ฃ๏ธ Egyptian Arabic | Trained on about 747 hours of Egyptian podcast speech. It reads everyday ุนุงู ูุฉ naturally. |
| ๐ Code-switching | English words written in Latin letters inside Arabic sentences: ยซุงู meeting ุจูุฑู ุงูุตุจุญยป. |
| ๐๏ธ Zero-shot cloning | Any voice from a 5โ10 s recording, plus 20 preset voices (10 male, 10 female). |
| โก Streaming | Audio is decoded in 80 ms frames while it is generated. |
| ๐ป CPU or GPU | Faster than real time on a laptop CPU. |
| ๐ข Text frontend | Numbers, dates, times, money, percentages, phone numbers, emails, URLs and acronyms are read out in Egyptian. |
| โ๏ธ Pronunciation control | Optional diacritics override the model's own reading. |
Quick start
pip install cairo-tts # add [ui] for the web interface
from cairo_tts import CairoTTS
tts = CairoTTS.from_pretrained("mohammedaly22/Cairo-TTS") # CPU by default; device="cuda" for a GPU
tts.save("ุงู meeting ุจูุฑู ุงูุตุจุญ ุจุฏุฑู, ู ูุง ุฑูุช ู
ุชุชุฃุฎุฑุด.", "out.wav", voice="malak")
tts.save("ุตูุชู ุงูุง ุจูู.", "me.wav", voice="my_recording.wav") # zero-shot cloning
for chunk in tts.stream("ุจุซ ู
ุจุงุดุฑ ูุงูุช ุจุชุณู
ุน."): # float32 chunks @ 24 kHz
...
print(tts.last_metrics) # TTFA, total time, real-time factor
cairo-tts say "ุงูููุงุฑุฏู ุงูุฌู ุญูู ุงูู." -o out.wav --voice ahmed
cairo-tts serve # web UI on http://127.0.0.1:8000
Pronunciation control
The model diacritizes on its own. Diacritics you write override it:
| You write | Effect | Example |
|---|---|---|
| a vowel | picks between readings | ูููุณููุง (she wants) vs ูููุณููุง (herself) |
ู / ู |
gemination / no vowel | ุจูุชู
ูุดููู, ุงุชูุญูุฑูุฌูุช |
| Latin words | read in English | ุงู deadline, ุงู project |
CEO, AI |
upper-case runs are spelled as English letters | โ c e o, a i |
Diacritics may be written in any order; the frontend normalizes them. . ends a sentence (longer pause), , or ุ makes a short pause, and ? / ! become ..
Preset voices
Twenty preset voices are in voices/, described in voices/voices.json:
- male: ู ุญู ุฏุ ุฃุญู ุฏุ ุนููุ ุนู ุฑุ ููุณูุ ู ุตุทููุ ูุฑูู ุ ุญุณูุ ุทุงุฑูุ ูุญูู
- female: ุณุงุฑุฉุ ู ุฑูู ุ ููุฑุ ูุงุทู ุฉุ ูุจุฉุ ูุงุณู ููุ ู ููุ ุฑูุงุ ุฏููุงุ ู ูู
Each is a clean 5โ10 s reference. Fourteen (mohamed, ahmed, ali, youssef, mostafa, karim, hassan, tarek, yehia, sara, mariam, yasmin, mona, rana) are recordings contributed by the author; six (omar, nour, fatma, heba, dina, malak) are speakers from the training podcasts, chosen by cloning fidelity and verified against each speaker's voice print. All were mastered to the same profile: 70 Hz high-pass, background noise gated out of the pauses, โ20 LUFS, peaks โค โ3 dBFS. tarek is the default voice. The names are made up.
Model details
| Architecture | Pocket TTS (Kyutai): a causal transformer over Mimi latents with a 1-step flow (LSD) head, then a streaming Mimi decoder at 24 kHz, 12.5 frames/s |
| Size | 6-layer backbone, about 100M parameters, 382 MB (fp32 safetensors) |
| Tokens | Arabic letters, diacritics, aโz, , . |
| Training data | About 747 hours of Egyptian podcast speech: diarized, quality-filtered, transcribed and loudness-normalized to โ20 LUFS |
| Recipe | 24-layer teacher fine-tuned from Pocket TTS (64k steps, cosine cooldown), distilled into this 6-layer student (30k steps); voice prompts โค 5 s |
| Code | Inference: Cairo-TTS |
Audio quality
The 1-step flow sampler loses some high-frequency detail (median โ2 dB at 1โ2.5 kHz, โ5 to โ7 dB at 3โ6 kHz versus the cloned reference, measured on 20 voices). The cairo-tts package corrects it with a linear-phase filter (clarity=1, the default): DNSMOS OVRL 3.336 โ 3.359, SIG 3.548 โ 3.570, bandwidth 5.9 โ 8.0 kHz, with noise (BAK) and UTMOS unchanged. clarity=0 gives the raw output.
Speed
Measured with the cairo-tts package, after warm-up, on 7โ11 s sentences:
| Device | Time to first audio | Speed |
|---|---|---|
| NVIDIA GTX 1660 Ti (6 GB) | about 80 ms | about 2.2ร real time |
| Intel i7-10750H (laptop CPU) | about 330 ms | about 2.6ร real time |
Faster GPUs mostly shorten the time to first audio. The model is small, so a laptop CPU is a good target.
Generation parameters
| Parameter | Default | Meaning |
|---|---|---|
temperature |
0.3 | sampling temperature: lower is steadier, higher is more expressive |
lsd_steps |
1 | flow decoding steps per 80 ms frame |
eos_threshold |
โ4.0 | end-of-speech threshold: higher stops earlier |
noise_clamp |
off | clamps the sampling noise |
frames_after_eos |
auto | 80 ms frames kept after the end of speech |
max_letters |
160 | long text is split at sentence and comma boundaries into chunks of this many letters |
clarity |
1.0 | correction of the model's measured high-frequency loss (0 = raw output) |
Files
model.safetensors weights
config.yaml pocket-tts model config (relative paths)
tokenizer.json 79-symbol character vocabulary
ta_marbuta_lexicon.json words whose final ู is a ta marbuta (ุฉ)
voice.wav / .safetensors fallback voice (the default preset is voices/tarek.wav)
voices/ 20 preset voices + voices.json
Limitations
- Egyptian Arabic first. MSA works but sounds Egyptian, and other dialects are not supported.
- English words are pronounced the way Egyptian podcasters say them. Long English-only passages are weaker.
- Rare names and words can be misread. Add diacritics to fix them.
- Cloning copies the microphone and the room as well as the voice. Use clean, single-speaker prompts.
- Text longer than about 160 letters is generated chunk by chunk, so prosody does not carry across chunks.
Responsible use
This model can imitate voices. Do not use it to impersonate anyone without their consent, to deceive, to commit fraud, or to make content that appears to come from a real person. The preset voices come from public podcasts and are provided for research and demonstration only. Disclose synthetic audio when you publish it.
License
The code is MIT. The weights are fine-tuned from Kyutai's Pocket TTS and follow the Pocket TTS terms.
Citation
@misc{cairotts2026,
title = {Cairo-TTS: Fast Egyptian Arabic Text-to-Speech with Code-Switching and Voice Cloning},
author = {Mohammed Aly},
year = {2026},
url = {https://huggingface.co/mohammedaly22/Cairo-TTS}
}
Thanks to Kyutai for Pocket TTS and Mimi.
- Downloads last month
- -
Model tree for mohammedaly22/Cairo-TTS
Base model
kyutai/pocket-tts