How to use from the
Use from the
Chatterbox library
# 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)

Chatterbox for the browser

A repackaging of onnx-community/chatterbox-ONNX sized for in-browser use.

Two changes from upstream:

  • speech_encoder is a 6 KB stub. transformers.js hardcodes it into Chatterbox's session list, so it is fetched whether or not you use it β€” 564 MB of model that a text-to-speech app never runs. The speaker conditioning it would produce is instead precomputed once and shipped as voices/default.bin (250 KB), passed straight to generate() as speaker_embeddings, speaker_features, audio_features and audio_tokens.
  • Only the q4f16 language model is included, not the fp32 copy.

Together these take the download from ~1.4 GB to ~865 MB.

Because the stub is never called, this repo cannot clone a new voice β€” it can only speak in the bundled one. Use the upstream repo for cloning.

Built for Natural Voice. Weights remain MIT, as upstream.

Downloads last month
166
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for arjun10g/chatterbox-web

Quantized
(1)
this model