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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
---
|
| 6 |
+

|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
# Chatterbox TTS
|
| 10 |
+
|
| 11 |
+
[](https://resemble-ai.github.io/chatterbox_turbo_demopage/)
|
| 12 |
+
[](https://huggingface.co/spaces/ResembleAI/chatterbox-turbo-demo)
|
| 13 |
+
[](https://podonos.com/resembleai/chatterbox)
|
| 14 |
+
[](https://discord.gg/rJq9cRJBJ6)
|
| 15 |
+
|
| 16 |
+
_Made with ♥️ by <a href="https://resemble.ai" target="_blank"><img width="100" alt="resemble-logo-horizontal" src="https://github.com/user-attachments/assets/35cf756b-3506-4943-9c72-c05ddfa4e525" /></a>
|
| 17 |
+
|
| 18 |
+
**Chatterbox** is a family of three state-of-the-art, open-source text-to-speech models by Resemble AI.
|
| 19 |
+
|
| 20 |
+
We are excited to introduce **Chatterbox-Turbo**, our most efficient model yet. Built on a streamlined 350M parameter architecture, **Turbo** delivers high-quality speech with less compute and VRAM than our previous models. We have also distilled the speech-token-to-mel decoder, previously a bottleneck, reducing generation from 10 steps to just **one**, while retaining high-fidelity audio output.
|
| 21 |
+
|
| 22 |
+
**Paralinguistic tags** are now native to the Turbo model, allowing you to use `[cough]`, `[laugh]`, `[chuckle]`, and more to add distinct realism. While Turbo was built primarily for low-latency voice agents, it excels at narration and creative workflows.
|
| 23 |
+
|
| 24 |
+
If you like the model but need to scale or tune it for higher accuracy, check out our competitively priced TTS service (<a href="https://resemble.ai">link</a>). It delivers reliable performance with ultra-low latency of sub 200ms—ideal for production use in agents, applications, or interactive media.
|
| 25 |
+
|
| 26 |
+
<img width="1200" height="600" alt="Podonos Turbo Eval" src="https://storage.googleapis.com/chatterbox-demo-samples/turbo/podonos_turbo.png" />
|
| 27 |
+
|
| 28 |
+
### ⚡ Model Zoo
|
| 29 |
+
|
| 30 |
+
Choose the right model for your application.
|
| 31 |
+
|
| 32 |
+
| Model | Size | Languages | Key Features | Best For | 🤗 | Examples |
|
| 33 |
+
|:----------------------------------------------------------------------------------------------------------------| :--- | :--- |:--------------------------------------------------------|:---------------------------------------------|:--------------------------------------------------------------------------| :--- |
|
| 34 |
+
| **Chatterbox-Turbo** | **350M** | **English** | Paralinguistic Tags (`[laugh]`), Lower Compute and VRAM | Zero-shot voice agents, Production | [Demo](https://huggingface.co/spaces/ResembleAI/chatterbox-turbo-demo) | [Listen](https://resemble-ai.github.io/chatterbox_turbo_demopage/) |
|
| 35 |
+
| Chatterbox-Multilingual [(Language list)](#supported-languages) | 500M | 23+ | Zero-shot cloning, Multiple Languages | Global applications, Localization | [Demo](https://huggingface.co/spaces/ResembleAI/Chatterbox-Multilingual-TTS) | [Listen](https://resemble-ai.github.io/chatterbox_demopage/) |
|
| 36 |
+
| Chatterbox [(Tips and Tricks)](#original-chatterbox-tips) | 500M | English | CFG & Exaggeration tuning | General zero-shot TTS with creative controls | [Demo](https://huggingface.co/spaces/ResembleAI/Chatterbox) | [Listen](https://resemble-ai.github.io/chatterbox_demopage/) |
|
| 37 |
+
|
| 38 |
+
## Installation
|
| 39 |
+
```shell
|
| 40 |
+
pip install chatterbox-tts
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
Alternatively, you can install from source:
|
| 44 |
+
```shell
|
| 45 |
+
# conda create -yn chatterbox python=3.11
|
| 46 |
+
# conda activate chatterbox
|
| 47 |
+
|
| 48 |
+
git clone https://github.com/resemble-ai/chatterbox.git
|
| 49 |
+
cd chatterbox
|
| 50 |
+
pip install -e .
|
| 51 |
+
```
|
| 52 |
+
We developed and tested Chatterbox on Python 3.11 on Debian 11 OS; the versions of the dependencies are pinned in `pyproject.toml` to ensure consistency. You can modify the code or dependencies in this installation mode.
|
| 53 |
+
|
| 54 |
+
## Usage
|
| 55 |
+
|
| 56 |
+
##### Chatterbox-Turbo
|
| 57 |
+
|
| 58 |
+
```python
|
| 59 |
+
import torchaudio as ta
|
| 60 |
+
import torch
|
| 61 |
+
from chatterbox.tts_turbo import ChatterboxTurboTTS
|
| 62 |
+
|
| 63 |
+
# Load the Turbo model
|
| 64 |
+
model = ChatterboxTurboTTS.from_pretrained(device="cuda")
|
| 65 |
+
|
| 66 |
+
# Generate with Paralinguistic Tags
|
| 67 |
+
text = "Hi there, Sarah here from MochaFone calling you back [chuckle], have you got one minute to chat about the billing issue?"
|
| 68 |
+
|
| 69 |
+
# Generate audio (requires a reference clip for voice cloning)
|
| 70 |
+
wav = model.generate(text, audio_prompt_path="your_10s_ref_clip.wav")
|
| 71 |
+
|
| 72 |
+
ta.save("test-turbo.wav", wav, model.sr)
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
##### Chatterbox and Chatterbox-Multilingual
|
| 76 |
+
|
| 77 |
+
```python
|
| 78 |
+
|
| 79 |
+
import torchaudio as ta
|
| 80 |
+
from chatterbox.tts import ChatterboxTTS
|
| 81 |
+
from chatterbox.mtl_tts import ChatterboxMultilingualTTS
|
| 82 |
+
|
| 83 |
+
# English example
|
| 84 |
+
model = ChatterboxTTS.from_pretrained(device="cuda")
|
| 85 |
+
|
| 86 |
+
text = "Ezreal and Jinx teamed up with Ahri, Yasuo, and Teemo to take down the enemy's Nexus in an epic late-game pentakill."
|
| 87 |
+
wav = model.generate(text)
|
| 88 |
+
ta.save("test-english.wav", wav, model.sr)
|
| 89 |
+
|
| 90 |
+
# Multilingual examples
|
| 91 |
+
multilingual_model = ChatterboxMultilingualTTS.from_pretrained(device=device)
|
| 92 |
+
|
| 93 |
+
french_text = "Bonjour, comment ça va? Ceci est le modèle de synthèse vocale multilingue Chatterbox, il prend en charge 23 langues."
|
| 94 |
+
wav_french = multilingual_model.generate(spanish_text, language_id="fr")
|
| 95 |
+
ta.save("test-french.wav", wav_french, model.sr)
|
| 96 |
+
|
| 97 |
+
chinese_text = "你好,今天天气真不错,希望你有一个愉快的周末。"
|
| 98 |
+
wav_chinese = multilingual_model.generate(chinese_text, language_id="zh")
|
| 99 |
+
ta.save("test-chinese.wav", wav_chinese, model.sr)
|
| 100 |
+
|
| 101 |
+
# If you want to synthesize with a different voice, specify the audio prompt
|
| 102 |
+
AUDIO_PROMPT_PATH = "YOUR_FILE.wav"
|
| 103 |
+
wav = model.generate(text, audio_prompt_path=AUDIO_PROMPT_PATH)
|
| 104 |
+
ta.save("test-2.wav", wav, model.sr)
|
| 105 |
+
```
|
| 106 |
+
See `example_tts.py` and `example_vc.py` for more examples.
|
| 107 |
+
|
| 108 |
+
## Supported Languages
|
| 109 |
+
Arabic (ar) • Danish (da) • German (de) • Greek (el) • English (en) • Spanish (es) • Finnish (fi) • French (fr) • Hebrew (he) • Hindi (hi) • Italian (it) • Japanese (ja) • Korean (ko) • Malay (ms) • Dutch (nl) • Norwegian (no) • Polish (pl) • Portuguese (pt) • Russian (ru) • Swedish (sv) • Swahili (sw) • Turkish (tr) • Chinese (zh)
|
| 110 |
+
|
| 111 |
+
## Original Chatterbox Tips
|
| 112 |
+
- **General Use (TTS and Voice Agents):**
|
| 113 |
+
- Ensure that the reference clip matches the specified language tag. Otherwise, language transfer outputs may inherit the accent of the reference clip’s language. To mitigate this, set `cfg_weight` to `0`.
|
| 114 |
+
- The default settings (`exaggeration=0.5`, `cfg_weight=0.5`) work well for most prompts across all languages.
|
| 115 |
+
- If the reference speaker has a fast speaking style, lowering `cfg_weight` to around `0.3` can improve pacing.
|
| 116 |
+
|
| 117 |
+
- **Expressive or Dramatic Speech:**
|
| 118 |
+
- Try lower `cfg_weight` values (e.g. `~0.3`) and increase `exaggeration` to around `0.7` or higher.
|
| 119 |
+
- Higher `exaggeration` tends to speed up speech; reducing `cfg_weight` helps compensate with slower, more deliberate pacing.
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
## Built-in PerTh Watermarking for Responsible AI
|
| 123 |
+
|
| 124 |
+
Every audio file generated by Chatterbox includes [Resemble AI's Perth (Perceptual Threshold) Watermarker](https://github.com/resemble-ai/perth) - imperceptible neural watermarks that survive MP3 compression, audio editing, and common manipulations while maintaining nearly 100% detection accuracy.
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
## Watermark extraction
|
| 128 |
+
|
| 129 |
+
You can look for the watermark using the following script.
|
| 130 |
+
|
| 131 |
+
```python
|
| 132 |
+
import perth
|
| 133 |
+
import librosa
|
| 134 |
+
|
| 135 |
+
AUDIO_PATH = "YOUR_FILE.wav"
|
| 136 |
+
|
| 137 |
+
# Load the watermarked audio
|
| 138 |
+
watermarked_audio, sr = librosa.load(AUDIO_PATH, sr=None)
|
| 139 |
+
|
| 140 |
+
# Initialize watermarker (same as used for embedding)
|
| 141 |
+
watermarker = perth.PerthImplicitWatermarker()
|
| 142 |
+
|
| 143 |
+
# Extract watermark
|
| 144 |
+
watermark = watermarker.get_watermark(watermarked_audio, sample_rate=sr)
|
| 145 |
+
print(f"Extracted watermark: {watermark}")
|
| 146 |
+
# Output: 0.0 (no watermark) or 1.0 (watermarked)
|
| 147 |
+
```
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
## Official Discord
|
| 151 |
+
|
| 152 |
+
👋 Join us on [Discord](https://discord.gg/rJq9cRJBJ6) and let's build something awesome together!
|
| 153 |
+
|
| 154 |
+
## Acknowledgements
|
| 155 |
+
- [Cosyvoice](https://github.com/FunAudioLLM/CosyVoice)
|
| 156 |
+
- [Real-Time-Voice-Cloning](https://github.com/CorentinJ/Real-Time-Voice-Cloning)
|
| 157 |
+
- [HiFT-GAN](https://github.com/yl4579/HiFTNet)
|
| 158 |
+
- [Llama 3](https://github.com/meta-llama/llama3)
|
| 159 |
+
- [S3Tokenizer](https://github.com/xingchensong/S3Tokenizer)
|
| 160 |
+
|
| 161 |
+
## Citation
|
| 162 |
+
If you find this model useful, please consider citing.
|
| 163 |
+
```
|
| 164 |
+
@misc{chatterboxtts2025,
|
| 165 |
+
author = {{Resemble AI}},
|
| 166 |
+
title = {{Chatterbox-TTS}},
|
| 167 |
+
year = {2025},
|
| 168 |
+
howpublished = {\url{https://github.com/resemble-ai/chatterbox}},
|
| 169 |
+
note = {GitHub repository}
|
| 170 |
+
}
|
| 171 |
+
```
|
| 172 |
+
## Disclaimer
|
| 173 |
+
Don't use this model to do bad things. Prompts are sourced from freely available data on the internet.
|