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
|
Download README.md from arjun10g/chatterbox-web: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/arjun10g/chatterbox-web/resolve/main/README.md
- Command line
-
hf download hf://arjun10g/chatterbox-web/README.md
-
curl -L -o README.md https://huggingface.co/arjun10g/chatterbox-web/resolve/main/README.md
1.19 kB
| license: mit | |
| library_name: transformers.js | |
| pipeline_tag: text-to-speech | |
| base_model: onnx-community/chatterbox-ONNX | |
| tags: [tts, chatterbox, webgpu, onnx] | |
| # Chatterbox for the browser | |
| A repackaging of [onnx-community/chatterbox-ONNX](https://huggingface.co/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](https://huggingface.co/spaces/arjun10g/natural-voice). | |
| Weights remain MIT, as upstream. | |