selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

chatterbox-tts-api logo

Self-host chatterbox-tts-api

v1.0.1

OpenAI-compatible local TTS API with voice cloning

ReleaseOpen SourceAGPL-3.0
Updatedlast year
LanguagePython
Setup difficultyModerate
MobileResponsive
ThemeDark mode
Stars
694
RAM
4GB minimum, 8GB+ recommended
Ports
4123 (API server), 4321 (Frontend web UI (when using --profile frontend))
Install with Docker Compose
Chatterbox TTS API frontend in dark modeChatterbox TTS API frontend in light modeChatterbox TTS API frontend processing view in dark modeChatterbox TTS API frontend processing view in light mode

What is chatterbox-tts-api?

Chatterbox TTS API is a FastAPI-powered REST server that provides an OpenAI-compatible text-to-speech endpoint with voice cloning capabilities. Built on top of the Chatterbox TTS model from Resemble AI, it enables users to generate speech in 22 languages using their own voice samples. The API includes a React-based web UI for managing voice libraries and testing generation, real-time audio streaming (both raw and SSE formats), long-text synthesis with background job processing, and comprehensive status monitoring. It can be deployed via Docker Compose (with GPU, CPU, and uv-optimized variants) or run locally with Python using uv or pip. The project is licensed under AGPL-3.0 and integrates with Open WebUI as a drop-in TTS backend.

Should you self-host chatterbox-tts-api?

chatterbox-tts-api scores 53/100 on selfhost.directory (how scoring works) and ranks #6 of 9 in Text to Speech. It has 694 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. It is AGPL-3.0-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is OmniVoice-Studio (94/100, 91 965 stars). It scores higher overall, so compare the two before you pick. See chatterbox-tts-api vs OmniVoice-Studio side by side.

Features

  • Auto API documentation
  • Long text synthesis
  • Memory Management
  • Multilingual support (22 languages)
  • OpenAI Compatible API
  • Parameter control
  • React web UI
  • Real-time Audio Streaming
  • Smart text processing
  • Status Monitoring
  • Type-safe API
  • Voice Cloning
  • Voice library management

chatterbox-tts-api README

How to install chatterbox-tts-api

Install chatterbox-tts-api with Docker Compose

Environment variables
PORT, FRONTEND_PORT, HOST, CORS_ORIGINS, DEVICE, VOICE_SAMPLE_PATH, MODEL_CACHE_DIR, VOICE_LIBRARY_DIR, USE_MULTILINGUAL_MODEL, EXAGGERATION, CFG_WEIGHT, TEMPERATURE, MAX_CHUNK_LENGTH, MAX_TOTAL_LENGTH, LONG_TEXT_DATA_DIR, LONG_TEXT_MAX_LENGTH, LONG_TEXT_CHUNK_SIZE, LONG_TEXT_SILENCE_PADDING_MS, LONG_TEXT_JOB_RETENTION_DAYS, LONG_TEXT_MAX_CONCURRENT_JOBS, MEMORY_CLEANUP_INTERVAL, CUDA_CACHE_CLEAR_INTERVAL, ENABLE_MEMORY_MONITORING

Clone and start with Docker Compose

git clone https://github.com/travisvn/chatterbox-tts-api cd chatterbox-tts-api

Use Docker-optimized environment variables

cp .env.example.docker .env # Docker-specific paths, ready to use

Or: cp .env.example .env # Local development paths, needs customization

Choose your deployment method:

API Only (default)

docker compose -f docker/docker-compose.yml up -d # Standard (pip-based) docker compose -f docker/docker-compose.uv.yml up -d # uv-optimized (faster builds) docker compose -f docker/docker-compose.gpu.yml up -d # Standard + GPU docker compose -f docker/docker-compose.uv.gpu.yml up -d # uv + GPU (recommended for GPU users) docker compose -f docker/docker-compose.cpu.yml up -d # CPU-only docker compose -f docker/docker-compose.blackwell.yml up -d # Blackwell (50XX) NVIDIA GPUs

API + Frontend (add --profile frontend to any of the above)

docker compose -f docker/docker-compose.yml --profile frontend up -d # Standard + Frontend docker compose -f docker/docker-compose.gpu.yml --profile frontend up -d # GPU + Frontend docker compose -f docker/docker-compose.uv.gpu.yml --profile frontend up -d # uv + GPU + Frontend docker compose -f docker/docker-compose.blackwell.yml --profile frontend up -d # (Blackwell) uv + GPU + Frontend

Watch the logs as it initializes (the first use of TTS takes the longest)

docker logs chatterbox-tts-api -f

Test the API

curl -X POST http://localhost:4123/v1/audio/speech
-H "Content-Type: application/json"
-d '{"input": "Hello from Chatterbox TTS!"}'
--output test.wav

Multiple variants: standard, uv-optimized, GPU, CPU, Blackwell; optional frontend profile

How to configure chatterbox-tts-api

  • CFG_WEIGHT0.5CFG weight for pace control

    CFG weight for pace control

    values: 0.0-1.0

  • CORS_ORIGINS*CORS origins (comma-separated list)

    CORS origins (comma-separated list)

  • CUDA_CACHE_CLEAR_INTERVAL3Clear CUDA cache every N requests

    Clear CUDA cache every N requests

  • DEVICEautoDevice to use for inference (auto/cuda/mps/cpu)

    Device to use for inference (auto/cuda/mps/cpu)

    values: auto/cuda/mps/cpu

  • ENABLE_MEMORY_MONITORINGtrueEnable detailed memory logging

    Enable detailed memory logging

    values: true/false

  • EXAGGERATION0.5Emotion intensity/exaggeration level

    Emotion intensity/exaggeration level

    values: 0.25-2.0

  • FRONTEND_PORT4321Port for frontend/proxy when using fullstack mode

    Port for frontend/proxy when using fullstack mode

  • HOST0.0.0.0Host to bind the server to

    Host to bind the server to

  • LONG_TEXT_CHUNK_SIZE2500Chunk size for splitting long text

    Chunk size for splitting long text

  • LONG_TEXT_DATA_DIR./data/long_text_jobsDirectory for long text job data and state persistence

    Directory for long text job data and state persistence

  • LONG_TEXT_JOB_RETENTION_DAYS7How many days to keep completed long text jobs

    How many days to keep completed long text jobs

  • LONG_TEXT_MAX_CONCURRENT_JOBS3Maximum number of concurrent long text jobs

    Maximum number of concurrent long text jobs

  • LONG_TEXT_MAX_LENGTH100000Maximum characters allowed for long text TTS

    Maximum characters allowed for long text TTS

  • LONG_TEXT_SILENCE_PADDING_MS200Silence padding between chunks in milliseconds

    Silence padding between chunks in milliseconds

  • MAX_CHUNK_LENGTH280Maximum characters per text chunk

    Maximum characters per text chunk

  • MAX_TOTAL_LENGTH3000Maximum total characters for entire input

    Maximum total characters for entire input

  • MEMORY_CLEANUP_INTERVAL5Cleanup memory every N requests

    Cleanup memory every N requests

  • MODEL_CACHE_DIR./modelsDirectory to cache downloaded models

    Directory to cache downloaded models

  • PORT4123API server port

    API server port

  • TEMPERATURE0.8Sampling temperature

    Sampling temperature

    values: 0.05-5.0

  • USE_MULTILINGUAL_MODELtrueEnable multilingual TTS model (23 languages)

    Enable multilingual TTS model (23 languages)

    values: true/false

  • VOICE_LIBRARY_DIR./voicesDirectory to store uploaded voice library

    Directory to store uploaded voice library

  • VOICE_SAMPLE_PATH./voice-sample.mp3Path to the voice sample file for cloning

    Path to the voice sample file for cloning

More in Text to Speech

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…