Chatterbox is a high-performance, OpenAI-compatible Text-to-Speech (TTS) server optimized for AIRI. It features dynamic voice cloning, persona-based text preprocessing, and a specialized queuing system to handle high-concurrency requests.
voices/ directory.profiles.json and presets.json on the fly.~), emoticons, and tilde mappings.[laughter], [sigh], or [whisper].ChatterboxTurboTTS for near-real-time synthesis.numpy<2).[!IMPORTANT] Python 3.11 is the officially supported version for Chatterbox.
Using Python 3.12 or 3.14 will cause installation failures (specifically with
numpyand legacy build tools likeimp). If you have multiple versions installed, theinstall.batwill attempt to selectpy -3.11automatically.
Chatterbox now has a first-class management flow inside AIRI. The release became available on your forks with:
airi commit 7c5ec4b1: Chatterbox studio CRUD UIchatterbox-tts-airi commit dd6d484: preset/profile CRUD endpointsIn practice:
For the full workflow and editing model, see USAGE.md.
The Chatterbox models (especially the Turbo version) are hosted on Hugging Face. To download them automatically, you must set an environment variable with your Hugging Face Access Token:
setx HF_TOKEN "your_token_here" (restart your terminal)export HF_TOKEN="your_token_here"If you don't want to set a system-wide variable, you can run this once to download the model and start the server:
set HF_TOKEN=your_token_here && run_server.bat --mannerisms=catgirl --turbo
[!NOTE]
You only need the token for the first run while the model is downloading. After that, the files are cached locally and you can runrun_server.batnormally.
Chatterbox is designed to be flexible across different GPU generations. Depending on your hardware, you should choose the appropriate installation path:
Most users should use the standard stable drivers:
If you have an RTX 5090 or similar and encounter kernel errors (e.g., torchvision::nms missing):
Run the provided installation script to automatically create the virtual environment and install base dependencies:
install.bat
Prepare Environment:
It is highly recommended to use the py launcher (Windows) to target the correct version:
py -3.11 -m venv venv
.\venv\Scripts\activate
Install Core Dependencies:
pip install -r requirements.txt
Hardware-Specific Optimization (Crucial):
install.bat / requirements.txt)venv:
pip uninstall torch torchvision torchaudio
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
Run the provided batch file to start the FastAPI server:
run_server.bat --mannerisms=kappybara --turbo
--mannerisms: Choose a character mannerism from profiles.json.--turbo: Use the high-speed Turbo model (requires higher VRAM).--port: Default is 8090.For quick one-off generation:
python runner.py zenbara "Hello Phil... [sigh] ~ how are you? ~" --turbo
presets.json)Presets are "Virtual Voices" that simplify character management. They map a unique ID (e.g., Lain (Acting)) to a base voice and a mannerism profile.
{
"Lain (Acting)": {
"voice_file": "lain",
"mannerism_profile": "wired_goddess",
"exaggeration": 0.0,
"ui_expressions": ["[whisper]", "[sigh]", "[gasp]"]
}
}
profiles.json)Manage character-specific logic:
tilde: Mappings for the ~ character (e.g., nyan for catgirl, bro for kappybara).hmph: Custom pronunciations for "hmph" variants (e.g., hahmf).emoticons: Regex-based replacements for patterns like 0_0.narrative: Character-specific speech settings for *text* (rate, volume).The server monitors the modification timestamps of profiles.json and presets.json. You can manually edit these files while the server is running, and the changes will be picked up instantly on the next API request.
supported_tags.md.0.0 (natural baseline). Increase this (e.g., to 1.0 or higher) for more intense emotional delivery.Environment: PyTorch Nightly cu128
Turbo Model (--turbo)
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 2.515 | 16.30 |
| 60 chars | 93 | 3.849 | 24.16 |
| 300 chars | 386 | 17.953 | 21.50 |
Standard Model
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 7.062 | 5.81 |
| 60 chars | 93 | 8.071 | 11.52 |
| 300 chars | 386 | 32.237 | 11.97 |
Environment: Standard Desktop Hardware
Standard Model
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 3.92 | 10.46 |
| 60 chars | 93 | 6.89 | 13.50 |
| 300 chars | 386 | 19.01 | 20.30 |
Turbo Model (--turbo)
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 11.88 | 3.45 |
| 60 chars | 93 | 20.86 | 4.46 |
| 300 chars | 386 | 121.15 | 3.19 |
[!WARNING]
Performance Inversion: On the RTX 3070, the Standard model is significantly faster than the Turbo model. This is likely due to VRAM limitations (8GB) or lack of specific kernel optimizations for this architecture in the Turbo model's dependency stack. Stick to the Standard model on this hardware.
Environment: Standard cu118
Turbo Model (--turbo)
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 6.054 | 6.77 |
| 60 chars | 93 | 7.921 | 11.74 |
| 300 chars | 386 | 16.499 | 23.40 |
Standard Model
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 7.609 | 5.39 |
| 60 chars | 93 | 13.182 | 7.06 |
| 300 chars | 386 | 81.751 | 4.72 |
server.py: The FastAPI wrapper. Supports presets, hot-reloading, and dynamic resolution.presets.json: JSON store for virtual voice configurations.profiles.json: JSON store for character mannerisms.install.bat: Automated setup and dependency installation script.requirements.txt: Pinned dependencies for environment stability.runner.py: CLI script for direct OGG Opus generation.benchmark.py: Script used for gathering generation timings.supported_tags.md: Reference list of verified sound/emotion tokens.voices/: Directory for voice cloning source files.padded_voices/: Directory for lengthened voice clone samples (Auto-Padding).Clients can discover capabilities and voices via:
GET /v1/voices: Returns a merged list of native voice files and virtual presets.GET /v1/audio/voices: Alias for the above.GET /chatterbox/capabilities: Returns available raw voice files, mannerism profiles, and TTS modes.POST /v1/audio/speech
voice: Can be a native voice (e.g., ivy) OR a preset ID (e.g., Lain (Acting)).input: The text to synthesize, supporting tags and profiles.response_format: mp3 (OGG Opus) or wav.nyan! [laughter] ... [sigh] ... chill bro.
Chatterbox is a high-performance, OpenAI-compatible Text-to-Speech (TTS) server optimized for AIRI. It features dynamic voice cloning, persona-based text preprocessing, and a specialized queuing system to handle high-concurrency requests.
voices/ directory.profiles.json and presets.json on the fly.~), emoticons, and tilde mappings.[laughter], [sigh], or [whisper].ChatterboxTurboTTS for near-real-time synthesis.numpy<2).[!IMPORTANT] Python 3.11 is the officially supported version for Chatterbox.
Using Python 3.12 or 3.14 will cause installation failures (specifically with
numpyand legacy build tools likeimp). If you have multiple versions installed, theinstall.batwill attempt to selectpy -3.11automatically.
Chatterbox now has a first-class management flow inside AIRI. The release became available on your forks with:
airi commit 7c5ec4b1: Chatterbox studio CRUD UIchatterbox-tts-airi commit dd6d484: preset/profile CRUD endpointsIn practice:
For the full workflow and editing model, see USAGE.md.
The Chatterbox models (especially the Turbo version) are hosted on Hugging Face. To download them automatically, you must set an environment variable with your Hugging Face Access Token:
setx HF_TOKEN "your_token_here" (restart your terminal)export HF_TOKEN="your_token_here"If you don't want to set a system-wide variable, you can run this once to download the model and start the server:
set HF_TOKEN=your_token_here && run_server.bat --mannerisms=catgirl --turbo
[!NOTE]
You only need the token for the first run while the model is downloading. After that, the files are cached locally and you can runrun_server.batnormally.
Chatterbox is designed to be flexible across different GPU generations. Depending on your hardware, you should choose the appropriate installation path:
Most users should use the standard stable drivers:
If you have an RTX 5090 or similar and encounter kernel errors (e.g., torchvision::nms missing):
Run the provided installation script to automatically create the virtual environment and install base dependencies:
install.bat
Prepare Environment:
It is highly recommended to use the py launcher (Windows) to target the correct version:
py -3.11 -m venv venv
.\venv\Scripts\activate
Install Core Dependencies:
pip install -r requirements.txt
Hardware-Specific Optimization (Crucial):
install.bat / requirements.txt)venv:
pip uninstall torch torchvision torchaudio
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
Run the provided batch file to start the FastAPI server:
run_server.bat --mannerisms=kappybara --turbo
--mannerisms: Choose a character mannerism from profiles.json.--turbo: Use the high-speed Turbo model (requires higher VRAM).--port: Default is 8090.For quick one-off generation:
python runner.py zenbara "Hello Phil... [sigh] ~ how are you? ~" --turbo
presets.json)Presets are "Virtual Voices" that simplify character management. They map a unique ID (e.g., Lain (Acting)) to a base voice and a mannerism profile.
{
"Lain (Acting)": {
"voice_file": "lain",
"mannerism_profile": "wired_goddess",
"exaggeration": 0.0,
"ui_expressions": ["[whisper]", "[sigh]", "[gasp]"]
}
}
profiles.json)Manage character-specific logic:
tilde: Mappings for the ~ character (e.g., nyan for catgirl, bro for kappybara).hmph: Custom pronunciations for "hmph" variants (e.g., hahmf).emoticons: Regex-based replacements for patterns like 0_0.narrative: Character-specific speech settings for *text* (rate, volume).The server monitors the modification timestamps of profiles.json and presets.json. You can manually edit these files while the server is running, and the changes will be picked up instantly on the next API request.
supported_tags.md.0.0 (natural baseline). Increase this (e.g., to 1.0 or higher) for more intense emotional delivery.Environment: PyTorch Nightly cu128
Turbo Model (--turbo)
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 2.515 | 16.30 |
| 60 chars | 93 | 3.849 | 24.16 |
| 300 chars | 386 | 17.953 | 21.50 |
Standard Model
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 7.062 | 5.81 |
| 60 chars | 93 | 8.071 | 11.52 |
| 300 chars | 386 | 32.237 | 11.97 |
Environment: Standard Desktop Hardware
Standard Model
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 3.92 | 10.46 |
| 60 chars | 93 | 6.89 | 13.50 |
| 300 chars | 386 | 19.01 | 20.30 |
Turbo Model (--turbo)
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 11.88 | 3.45 |
| 60 chars | 93 | 20.86 | 4.46 |
| 300 chars | 386 | 121.15 | 3.19 |
[!WARNING]
Performance Inversion: On the RTX 3070, the Standard model is significantly faster than the Turbo model. This is likely due to VRAM limitations (8GB) or lack of specific kernel optimizations for this architecture in the Turbo model's dependency stack. Stick to the Standard model on this hardware.
Environment: Standard cu118
Turbo Model (--turbo)
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 6.054 | 6.77 |
| 60 chars | 93 | 7.921 | 11.74 |
| 300 chars | 386 | 16.499 | 23.40 |
Standard Model
| Length | Chars | Time (s) | Chars/s |
|---|---|---|---|
| 20 chars | 41 | 7.609 | 5.39 |
| 60 chars | 93 | 13.182 | 7.06 |
| 300 chars | 386 | 81.751 | 4.72 |
server.py: The FastAPI wrapper. Supports presets, hot-reloading, and dynamic resolution.presets.json: JSON store for virtual voice configurations.profiles.json: JSON store for character mannerisms.install.bat: Automated setup and dependency installation script.requirements.txt: Pinned dependencies for environment stability.runner.py: CLI script for direct OGG Opus generation.benchmark.py: Script used for gathering generation timings.supported_tags.md: Reference list of verified sound/emotion tokens.voices/: Directory for voice cloning source files.padded_voices/: Directory for lengthened voice clone samples (Auto-Padding).Clients can discover capabilities and voices via:
GET /v1/voices: Returns a merged list of native voice files and virtual presets.GET /v1/audio/voices: Alias for the above.GET /chatterbox/capabilities: Returns available raw voice files, mannerism profiles, and TTS modes.POST /v1/audio/speech
voice: Can be a native voice (e.g., ivy) OR a preset ID (e.g., Lain (Acting)).input: The text to synthesize, supporting tags and profiles.response_format: mp3 (OGG Opus) or wav.nyan! [laughter] ... [sigh] ... chill bro.