Shami-TTS — Production-Grade Levantine Arabic ↔ English Code-Switching TTS
A low-latency, streaming text-to-speech system that speaks natural, Levantine
Arabic and switches to English mid-utterance without a prosodic seam. v2 turns the
promising-but-robotic v1 baseline into a production-grade voice on a single consumer
GPU (RTX 3060, 12 GB): Levantine CER 0.75 → 0.11 (−86%), WER 0.99 → 0.35, natural
prosody, 24 kHz fidelity, and reference-level texture — at ~11× faster than real-time.
This card documents v2 exhaustively — what changed from v1, the architecture, the two
vocoder options we release, measured results, usage for both, the training recipe, an honest
engineering log, and licensing. A full 9-page technical report is included at
paper/shami_tts.pdf.
Two vocoders released. The HiFi-GAN decoder is a single self-contained VITS model
(minimal deps). BigVGAN re-vocodes for the cleanest texture (removes the residual
high-frequency breathiness). Pick per your fidelity/latency/dependency budget.
Single flagship speaker ("Badr") in this release; multi-speaker is v3.
Infer at length_scale = 1.0 (deterministic duration — do not use 3–5 as in v1).
🔊 Listen
Synthesized at length_scale=1.0. Reference = real recording; HiFi-GAN = self-contained decoder; BigVGAN = highest-fidelity vocoder. Players stream on demand.
Pure Levantine
ضلت واقفة ساكتة بدون ما تحكي بَسْ كانت تتفرج علي وانا كنت راقب المي وهي عم تنزل وسرحانة.
Reference
HiFi-GAN
BigVGAN
حسيت فيهن وَجَع و انكسار وجعو متل وجعي التنين مظلومين و بدون حيلة.
Reference
HiFi-GAN
BigVGAN
ما فيك تعمل شُغُل مرتب بلبنان الا اذا كان عندك ظهر ماكن.
v2 is four targeted contributions, each measured (see the report):
Dialectal front-end. Automatic diacritization (CAMeL Tools) is now the default path,
so ~100% (not 0.4%) of bare conversational text is phonemized through the high-quality
Levantine rule-G2P. A new de-desinentialization step strips MSA case/mood endings that
Levantine drops (مَوْعِد → moːʕid, not moːʕidi) while preserving gemination.
→ Levantine CER 0.75 → 0.46.
Deterministic duration head. Replaces VITS's stochastic duration predictor (which
under-predicted ~3×, forcing a prosody-flattening global stretch) with a deterministic
head trained by MSE on alignment durations. Natural rhythm at length_scale=1.
→ CER 0.46 → 0.11 (the robotic→natural unlock).
24 kHz fidelity + texture recipe. Decoder fine-tuned to native 24 kHz; feature-matching
up-weighted; the discriminator is now persisted across warm-starts (it used to restart
from scratch — a real bug that caused buzz); a multi-resolution STFT loss added.
→ full-band fidelity, buzz at reference level, CER flat.
Anti-aliased BigVGAN vocoder. Removes the residual high-frequency breathiness
(a phase/aliasing artifact) that magnitude losses can't fix. → texture matches the source.
The story is two-regime: intelligibility is solved by data + duration (steep CER drop),
then fidelity/texture improvements (24 kHz, feature-matching, BigVGAN) hold CER while
raising perceptual quality — which CER does not measure. Trust the audio in samples/.
Acoustic model (ShamiVITS): ~36 M params. VITS core (CVAE + flow + monotonic alignment),
with the text-encoder embedding replaced by a shared IPA table, an additive language-ID
embedding, and the stochastic duration predictor swapped for the deterministic head.
(In the reference code this is the HamsVITS class in the hams_tts package — the import
path is unchanged for backward compatibility.)
Vocoders: native HiFi-GAN decoder (~inside VITS), or pretrained
nvidia/bigvgan_v2_24khz_100band_256x
(112 M, MIT) — an exact match for our 24 kHz / hop-256 pipeline, used with no fine-tuning.
BigVGAN is fetched from the Hub on first use (use_cuda_kernel=False → pure-PyTorch,
Windows/CPU-safe). Always synthesize at length_scale=1.0.
4. Results (held-out set, n=40)
Consistently measured; ASR round-trip via Whisper large-v3, Arabic forced, text normalized
(diacritics/alef/ya/ta-marbuta folded). Full analysis in the report.
System
Lev CER
Lev WER
CS CER
Overall CER
RTF
Published baseline (16 kHz, stochastic dur.)
0.751
0.993
0.853
0.802
0.024
v2, HiFi-GAN (24 kHz)
0.113
0.377
0.498
0.305
0.028
v2, + BigVGAN
0.106
0.347
0.556
0.331
~0.085
Texture: high-frequency spectral flatness matches the reference (0.49–0.51 vs 0.488).
Duration: ratio 0.97 at natural pacing. Robustness: 8/8 novel unseen sentences
(long, heavy code-switch, numbers/dates) synthesized cleanly.
On the code-switch CER column: BigVGAN slightly raises it while improving pure
Levantine and perceived quality. This is a Whisper artifact — Whisper is MSA/English
biased and mis-scores the English-in-Arabic segments; it is not an audible regression.
Absolute CER via ASR has a floor well above zero on dialectal Arabic; treat relative
numbers and the released audio as the source of truth. Human MOS is future work.
5. Training recipe (single RTX 3060, 12 GB, bf16)
Warm-started stages, each a fine-tune of the previous best:
mohammedaly22/lahgtna-levantine-tts
(CC-BY-4.0): 50k clips / 66.8 h / 24 kHz / 10 speakers, Shami Levantine + ~12% synthetic
code-switch, partially diacritized. This release = single speaker "Badr" (~6.2 h).
7. Limitations
Single speaker; small eval set (±0.02 CER noise); ASR-CER floor on dialectal Arabic
under-states true quality; BigVGAN path runs two vocoders (a single-pass mel→BigVGAN model is
v3); multi-speaker is v3.
8. Licensing
Code: Apache-2.0 (this project's source).
These weights:CC-BY-NC-4.0 — derived from facebook/mms-tts-ara (Meta MMS), which
is non-commercial. Non-commercial use only unless you retrain from a permissive base.
1@techreport{shami_tts_2026,
2 title = {Shami-TTS: A Production-Grade Streaming TTS for Levantine Arabic/English
3 Code-Switching via Dialectal Front-End, Deterministic Duration, and
4 Anti-Aliased Neural Vocoding},
5 author = {{Tushe Language Research Team}},
6 year = {2026},
7 institution = {Tushe Language Research},
8 note = {https://huggingface.co/Tushe/shami-tts}
9}
Built on VITS (Kim et al., 2021), HiFi-GAN (Kong et al., 2020), BigVGAN (Lee et al., 2023),
MMS (Pratap et al., 2023), CAMeL Tools (Obeid et al., 2020), Whisper (Radford et al., 2023).