Chatterbox
Collection
Chatterbox models in ONNX for phoonnx. โข 4 items โข Updated
How to use Phoonnx/chatterbox-en_us-unicode 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)A Chatterbox model by Resemble AI, from ResembleAI/chatterbox, packaged for phoonnx, our ONNX text-to-speech library.
| Architecture | Chatterbox |
| Upstream | ResembleAI/chatterbox |
| ONNX conversion | onnx-community/chatterbox-ONNX |
| Author | Resemble AI |
| Languages | en-US |
| Text input | Unicode codepoints of the text |
pip install --pre phoonnx
import wave
from phoonnx.model_manager import TTSModelManager
manager = TTSModelManager()
manager.load()
manager.merge_default_voices()
voice = manager.voices["chatterbox/base/en"].load()
with wave.open("output.wav", "wb") as wav_file:
text = "..." # a sentence in en-US
voice.synthesize_wav(text, wav_file)
The voice clones a speaker from reference audio; the phoonnx README shows how to pass it.
In OVOS, phoonnx installs the ovos-tts-plugin-phoonnx plugin. Select the voice in mycroft.conf:
{"tts": {"module": "ovos-tts-plugin-phoonnx", "ovos-tts-plugin-phoonnx": {"voice": "chatterbox/base/en"}}}
phoonnx hands the text to scriptconv, our text conversion library, which normalises it and turns it into the model's input:
unicode: UnicodeCodepointPhonemizer from scriptconv.phonemizers.base, in scriptconv itself.chatterbox/base/enThe upstream declares the licence mit in the model card of ResembleAI/chatterbox.