Views
No views yet
language_id = "ar")ar)
If the reference audio is not Egyptian Arabic, accent leakage may occur.
1import numpy as np
2from huggingface_hub import snapshot_download
3from chatterbox.mtl_tts import ChatterboxMultilingualTTS
4
5# Select device
6DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
7
8# Download model checkpoint
9ckpt_dir = snapshot_download(
10 repo_id="oddadmix/chatterbox-egyptian-v0",
11 repo_type="model",
12 revision="main",
13)
14
15# Load model
16model = ChatterboxMultilingualTTS.from_checkpoint(
17 str(ckpt_dir) + "/",
18 DEVICE
19)
20
21# Optional: move to device explicitly
22if hasattr(model, "to"):
23 model.to(DEVICE)
24
25# Egyptian Arabic (Masri) text
26text = "أنا رايح الشغل دلوقتي وهكلمك أول ما أوصل."
27
28# Generate speech
29wav = model.generate(
30 text=text,
31 language_id="ar",
32 temperature=0.8,
33 cfg_weight=0.5,
34 exaggeration=0.5,
35)
36
37# Save output audio
38import soundfile as sf
39sf.write(
40 "egyptian_tts.wav",
41 wav.squeeze(0).cpu().numpy(),
42 model.sr
43)
44
45print("Audio saved as egyptian_tts.wav")1@misc{chatterbox_egyptian_tts,
2 title={Chatterbox Egyptian Arabic (Masri) Text-to-Speech},
3 author={oddadmix},
4 year={2025},
5 howpublished={\url{https://huggingface.co/oddadmix/chatterbox-egyptian-v0}}
6}