Instructions to use OpenVoiceOS/phoonnx-chatterbox-lahgtna with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Chatterbox
How to use OpenVoiceOS/phoonnx-chatterbox-lahgtna with Chatterbox:
# pip install chatterbox-tts import torchaudio as ta from chatterbox.tts import ChatterboxTTS model = ChatterboxTTS.from_pretrained(device="cuda") text = "Ezreal and Jinx teamed up with Ahri, Yasuo, and Teemo to take down the enemy's Nexus in an epic late-game pentakill." wav = model.generate(text) ta.save("test-1.wav", wav, model.sr) # If you want to synthesize with a different voice, specify the audio prompt AUDIO_PROMPT_PATH="YOUR_FILE.wav" wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH) ta.save("test-2.wav", wav, model.sr) - Notebooks
- Google Colab
- Kaggle
phoonnx-chatterbox-lahgtna
Mirror of Lahgtna, a
Chatterbox fine-tune specialized for spoken Arabic dialects, exported to
ONNX for phoonnx, OpenVoiceOS's
offline TTS library. It is fine-tuned from
Chatterbox Multilingual
and shares its architecture: an autoregressive Llama-backbone codec-LM with
zero-shot cloning from an untranscribed reference clip and an
exaggeration control. See
docs/training/engines/chatterbox.md
and docs/cloning.md.
Ten dialect codes are exposed as separate voice IDs, one per Arabic-speaking
region: Egypt (eg), Saudi Arabia (sa), Morocco (mo), Iraq (iq),
Lebanon (lb), Sudan (sd), Libya (ly), Syria (sy), Tunisia (tn), and
Palestine (ps). All map to the same underlying language_model_q4.onnx
graph in this repository; the dialect selection happens in text
normalization/tokenization, not a different model per dialect.
Related repositories: phoonnx-chatterbox (base English), phoonnx-chatterbox-turbo (faster GPT-2-based variant), phoonnx-chatterbox-multilingual (the base this was fine-tuned from).
Usage
Cloning support requires pip install phoonnx[cloning].
import wave
from phoonnx.model_manager import TTSModelManager
manager = TTSModelManager()
manager.load()
manager.merge_default_voices()
voice = manager.voices["chatterbox/lahgtna/eg"].load()
with wave.open("out.wav", "wb") as wav_file:
voice.synthesize_wav(
"ุฃููุงูุ ุฅุฒููุ",
wav_file,
speaker_reference="reference.wav", # optional: clone this speaker
)
License
Lahgtna is released by its authors (oddadmix)
under the MIT license, the same license as the Chatterbox base and
multilingual models it descends from. phoonnx itself is Apache-2.0.