Instructions to use arjun10g/chatterbox-web with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use arjun10g/chatterbox-web with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-to-speech', 'arjun10g/chatterbox-web'); - Chatterbox
How to use arjun10g/chatterbox-web 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
Chatterbox for the browser
A repackaging of onnx-community/chatterbox-ONNX sized for in-browser use.
Two changes from upstream:
speech_encoderis 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 asvoices/default.bin(250 KB), passed straight togenerate()asspeaker_embeddings,speaker_features,audio_featuresandaudio_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
- 46