Downloads ยท 30 days
109
23% of all-time downloads
mohammedaly22/leva-tts
leva-tts is a text-to-speech model from mohammedaly22. Use it when you need text read aloud. It is set up for coqui. The card lists the license as cc-by-nc-4.0.
<div align="center" <img src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/docs/LevaTTS-Banner-Image.png" alt="Leva-TTS โ Levantine Arabic โ English Text-to-Speech" width="100%" </div
Downloads ยท 30 days
109
23% of all-time downloads
All-time downloads
476
Public
Repo size
5.6 GB
Likes
3
Public
Click a slice to open those files.
.pth5.6 GB ยท 100%
From the Hugging Face model README
A production-oriented Levantine Text-to-Speech model โ a fine-tuned XTTS-v2 optimized for real-time conversational agents.
| ๐ฏ KPI | Target | Measured | Status |
|---|---|---|---|
| Peak VRAM (inference) | โค 3 GB | 2.13 GB | โ |
| Time-to-First-Audio (p50) | < 300 ms | 565 ms | โ ๏ธ |
| Real-Time Factor (RTF) | < 0.3 | 0.21 | โ |
| Streaming output | required | chunked PCM + WS | โ |
Leva-TTS is a text-to-speech model for Levantine Arabic / English code-switching, built by fine-tuning XTTS-v2 on 50,000 synthetic utterances generated with Lahgtna-OmniVoice v2. It handles natural intra-sentence switching between Levantine dialect and English, supports 10 built-in speakers and zero-shot voice cloning, and offers a streaming generator for low-latency conversational use.
coqui/XTTS-v2 (GPT autoregressive backbone + HiFi-GAN decoder)ar), English (en), and code-switch mixes| Feature | Details |
|---|---|
| ๐ฃ๏ธ Natural code-switching | Intra-sentence Arabic โ English |
| โก Streaming output | First audio chunk < 300 ms |
| ๐พ Low VRAM | โค 3 GB at inference |
| ๐ฟ Levantine dialect | ูโ/ส/ glottal, ุฌโ/ส/, il- article, b- prefix |
| ๐ค Smart text front-end | Partial diacritics on homographs + Levantine lexicon |
| ๐ฅ 10 speakers | 5 male + 5 female, diverse Levantine accents |
| ๐ก WebSocket streaming | FastAPI server with real-time chunked PCM |
| ๐ Pipecat ready | Drop-in TTSService for voice agents |
conda create -n leva-tts python=3.10 -y && conda activate leva-tts
sudo apt-get install -y espeak-ng ffmpeg libsndfile1
# Install PyTorch first so pip locks a CUDA build matching your GPU driver.
# (torch >= 2.9 ships CUDA-13 wheels that fail on common CUDA-12.x drivers.)
pip install torch==2.3.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121
pip install leva-tts
Leva-TTS uses the maintained
coqui-ttsfork (sameTTS/XTTS modules); the unmaintainedTTSpackage pinsnumpy==1.22.0and cannot resolve on modern Python. A plainpip install leva-ttsresolves cleanly.
from leva_tts import LevaTTS, SPEAKERS
import soundfile as sf
tts = LevaTTS(device="cuda", preprocess_text=True, verbose=False)
# auto-downloads this checkpoint + the 10 reference speakers on first use
# 1) Built-in speaker (speaker must be one of SPEAKERS, else ValueError)
wav, sr = tts.synthesize("ูููููู ุฃูุง ุนู
ุฃุดุชุบู ุนูู the project",
speaker="Badr", temperature=0.65)
sf.write("out.wav", wav, sr) # sr == 24000
# 2) Zero-shot voice cloning (your own 3โ10 s clip)
wav, sr = tts.zero_shot_synthesize("ูุงููู the meeting ูุงูุช important ูุชูุฑ",
"my_voice.wav")
# 3) Streaming generators
for chunk in tts.stream("ุจูุฏููู ุฃุญูููู ุนู the new feature", speaker="Amina"):
... # play / forward each chunk
for chunk in tts.zero_shot_stream("ููู ุนู
ูุดุชุบู", "my_voice.wav"):
...
Generation parameters (optional, per-call on every method):
temperature, length_penalty, repetition_penalty, top_k, top_p, speed.
For the FastAPI streaming server, Pipecat integration, the Gradio demo, evaluation and fine-tuning, clone the repo: ๐ https://github.com/MohammedAly22/Leva-TTS
| File | Description |
|---|---|
best_model.pth | Fine-tuned XTTS-v2 checkpoint (GPT + decoder) |
config.json | XTTS-v2 config |
reference_audios/ | The 10 built-in speaker reference clips + references.json |
sample_wavs/ | Audio sample comparisons (Base XTTS-v2 vs Lahgtna v2 vs Leva-TTS) |
Manual download:
huggingface-cli download mohammedaly22/leva-tts
Click a sentence to expand and play the three models. Progression: Base XTTS-v2 โ Lahgtna v2 โ Leva-TTS.
Base XTTS-v2
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/xtts_base/badr_cs.wav"></audio>
Lahgtna v2 (Levantine fine-tune)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/lahgtna/badr_cs.wav"></audio>
๐ข Leva-TTS (this model)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/leva_tts/badr_cs.wav"></audio>
</details> <details> <summary>ูุงููู the weather today ูุชูุฑ ุญูู ุจุฏู ุฃุทูุน ุจุฑุง โ <b>Fatma (F)</b></summary>Base XTTS-v2
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/xtts_base/fatma_cs.wav"></audio>
Lahgtna v2 (Levantine fine-tune)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/lahgtna/fatma_cs.wav"></audio>
๐ข Leva-TTS (this model)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/leva_tts/fatma_cs.wav"></audio>
</details> <details> <summary>ุจูุฏููู ุฃุญูููู ุนู the meeting ุงููู ูุงู ู ูู ูุชูุฑ ุงูููู โ <b>Mona (F)</b></summary>Base XTTS-v2
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/xtts_base/mona_cs.wav"></audio>
Lahgtna v2 (Levantine fine-tune)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/lahgtna/mona_cs.wav"></audio>
๐ข Leva-TTS (this model)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/leva_tts/mona_cs.wav"></audio>
</details>Base XTTS-v2
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/xtts_base/badr_ar.wav"></audio>
Lahgtna v2 (Levantine fine-tune)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/lahgtna/badr_ar.wav"></audio>
๐ข Leva-TTS (this model)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/leva_tts/badr_ar.wav"></audio>
</details> <details> <summary>ูููููู ุฑุญ ุฃุฑูุญ ุนูู ุงูุจูุช ูุจูุฑุง ุจุฑุฌุน โ <b>Amina (F)</b></summary>Base XTTS-v2
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/xtts_base/amina_ar.wav"></audio>
Lahgtna v2 (Levantine fine-tune)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/lahgtna/amina_ar.wav"></audio>
๐ข Leva-TTS (this model)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/leva_tts/amina_ar.wav"></audio>
</details> <details> <summary>ุดู ุฑุฃูู ูุทูุน ูุชู ุดู ุดูู ุจุนุฏ ุงูุดุบู ุฅุฐุง ุงูุฌู ูุงู ู ููุญุ โ <b>Rami (M)</b></summary>Base XTTS-v2
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/xtts_base/rami_ar.wav"></audio>
Lahgtna v2 (Levantine fine-tune)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/lahgtna/rami_ar.wav"></audio>
๐ข Leva-TTS (this model)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/leva_tts/rami_ar.wav"></audio>
</details>Base XTTS-v2
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/xtts_base/lamyaa_en.wav"></audio>
Lahgtna v2 (Levantine fine-tune)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/lahgtna/lamyaa_en.wav"></audio>
๐ข Leva-TTS (this model)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/leva_tts/lamyaa_en.wav"></audio>
</details> <details> <summary>The project deadline is next Friday. โ <b>Mohamed (M)</b></summary>Base XTTS-v2
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/xtts_base/mohamed_en.wav"></audio>
Lahgtna v2 (Levantine fine-tune)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/lahgtna/mohamed_en.wav"></audio>
๐ข Leva-TTS (this model)
<audio controls src="https://huggingface.co/mohammedaly22/leva-tts/resolve/main/sample_wavs/leva_tts/mohamed_en.wav"></audio>
</details>Speaker Mohamed ยท NVIDIA H100 ยท Whisper large-v3 ASR round-trip ยท UTMOS (reference-free MOS).
| Metric | Value |
|---|---|
| Peak VRAM (inference) | 2.13 GB |
| RTF p50 / p95 | 0.36 / 0.53 |
| TTFA p50 / p95 (batch) | 1194 / 1743 ms |
| TTFA streaming (first chunk) | ~565 ms |
| CER (mean) | 0.255 |
| WER (mean) | 0.496 |
| UTMOS | 3.13 / 5.0 |
| Category | CER โ | WER โ | UTMOS โ |
|---|---|---|---|
| Pure English | 0.144 | 0.190 | 3.35 |
| Pure Levantine Arabic | 0.236 | 0.544 | 2.97 |
| Code-Switching | 0.330 | 0.602 | 3.19 |
An optimized inference path (TF32 + torch.compile on the GPT) lowers RTF p95 by
~6% and TTFA while slightly improving UTMOS (3.24). See the repo's scripts/evaluate.py --optimize.
apc language code).A text front-end runs before synthesis (enabled via preprocess_text=True):
language-aware normalization of numbers, floats, dates, times, currency,
percentages, URLs, emails, phone numbers and codes, plus partial diacritics and a
Levantine lexicon.
@software{leva_tts_2026,
author = {Mohammed Aly},
title = {Leva-TTS: Low-Latency Code-Switching TTS for Levantine Arabic and English},
year = {2026},
url = {https://github.com/MohammedAly22/Leva-TTS}
}
Built on Coqui XTTS-v2 and Lahgtna-OmniVoice v2.