Skip to content

Commit df21d17

Browse files
authored
Merge pull request #29 from roryeckel/copilot/fix-28
Add Chatterbox TTS Docker Compose example integration
2 parents 1b8c150 + 64aee2a commit df21d17

File tree

2 files changed

+92
-5
lines changed

2 files changed

+92
-5
lines changed

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,28 @@ For users who want high-quality text-to-speech without API costs, Microsoft Edge
252252
docker compose -f docker-compose.openai-edge-tts.yml up -d
253253
```
254254

255-
#### 6. Development with Docker
255+
#### 6. Deploying with Chatterbox TTS
256+
257+
For users who want high-quality local text-to-speech with voice cloning capabilities, Chatterbox TTS provides an OpenAI-compatible API with advanced voice cloning features. This setup runs completely locally and supports custom voice training.
258+
259+
- **Chatterbox TTS Setup**:
260+
- Local OpenAI-compatible text-to-speech API with voice cloning capabilities
261+
- Supports custom voice samples for personalized speech generation
262+
- Advanced voice library management with persistent storage
263+
- FastAPI-powered with real-time status monitoring and streaming support
264+
- GPU acceleration support for faster processing
265+
- No external API dependencies - runs completely offline
266+
- [Learn more about Chatterbox TTS API](https://github.com/travisvn/chatterbox-tts-api)
267+
268+
- **Docker Compose Configuration**: Use the `docker-compose.chatterbox.yml` template which includes configuration for both the Wyoming OpenAI proxy and Chatterbox TTS service.
269+
270+
- **Command**:
271+
272+
```bash
273+
docker compose -f docker-compose.chatterbox.yml up -d
274+
```
275+
276+
#### 7. Development with Docker
256277

257278
If you are developing the Wyoming OpenAI proxy server and want to build it from source, use the `docker-compose.dev.yml` file along with the base configuration.
258279

@@ -262,17 +283,17 @@ If you are developing the Wyoming OpenAI proxy server and want to build it from
262283
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build
263284
```
264285

265-
#### 7. Example: Development with Additional Local Service
286+
#### 8. Example: Development with Additional Local Service
266287

267-
For a development setup using the Speaches local service, combine `docker-compose.speaches.yml` and `docker-compose.dev.yml`. This also works for `docker-compose.kokoro-fastapi.yml`, `docker-compose.localai.yml`, and `docker-compose.openai-edge-tts.yml`.
288+
For a development setup using the Speaches local service, combine `docker-compose.speaches.yml` and `docker-compose.dev.yml`. This also works for `docker-compose.kokoro-fastapi.yml`, `docker-compose.localai.yml`, `docker-compose.openai-edge-tts.yml`, and `docker-compose.chatterbox.yml`.
268289

269290
- **Command**:
270291

271292
```bash
272293
docker compose -f docker-compose.speaches.yml -f docker-compose.dev.yml up -d --build
273294
```
274295

275-
#### 8. Docker Tags
296+
#### 9. Docker Tags
276297

277298
We follow specific tagging conventions for our Docker images. These tags help in identifying the version and branch of the code that a particular Docker image is based on.
278299

@@ -286,7 +307,7 @@ We follow specific tagging conventions for our Docker images. These tags help in
286307

287308
- **`pr-{number}`**: Pull request tags (e.g., `pr-123`) are automatically created for each pull request to allow testing of proposed changes before they are merged. These tags are automatically cleaned up when the pull request is closed or merged.
288309

289-
#### 9. Pull Request Docker Images
310+
#### 10. Pull Request Docker Images
290311

291312
For contributors and maintainers who want to test changes from pull requests before they are merged, we automatically build and push Docker images for each pull request.
292313

docker-compose.chatterbox.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
services:
2+
wyoming_openai:
3+
image: ghcr.io/roryeckel/wyoming_openai:latest
4+
container_name: wyoming_openai
5+
ports:
6+
- "10300:10300"
7+
restart: unless-stopped
8+
environment:
9+
WYOMING_URI: tcp://0.0.0.0:10300
10+
WYOMING_LOG_LEVEL: INFO
11+
WYOMING_LANGUAGES: en
12+
TTS_OPENAI_URL: http://chatterbox-tts:4123/v1
13+
TTS_MODELS: "tts-1-hd"
14+
TTS_BACKEND: "OPENAI"
15+
TTS_VOICES: "default"
16+
TTS_SPEED: "1.0"
17+
depends_on:
18+
chatterbox-tts:
19+
condition: service_healthy
20+
21+
chatterbox-tts:
22+
image: travisvn/chatterbox-tts-api:latest
23+
container_name: chatterbox-tts
24+
restart: unless-stopped
25+
ports:
26+
- "4123:4123"
27+
environment:
28+
# API Configuration
29+
- PORT=4123
30+
- HOST=0.0.0.0
31+
32+
# TTS Model Settings
33+
- EXAGGERATION=0.5
34+
- CFG_WEIGHT=0.5
35+
- TEMPERATURE=0.8
36+
37+
# Text Processing
38+
- MAX_CHUNK_LENGTH=280
39+
- MAX_TOTAL_LENGTH=3000
40+
41+
# Voice and Model Settings
42+
# - VOICE_SAMPLE_PATH=/app/voice-sample.mp3
43+
- DEVICE=auto
44+
- MODEL_CACHE_DIR=/cache
45+
# - VOICE_LIBRARY_DIR=/voices
46+
47+
# Memory Settings
48+
- MEMORY_CLEANUP_INTERVAL=5
49+
- CUDA_CACHE_CLEAR_INTERVAL=3
50+
- ENABLE_MEMORY_MONITORING=true
51+
volumes:
52+
# Mount model cache for persistence
53+
- chatterbox-models:/cache
54+
55+
# Mount voice library for persistence
56+
# - chatterbox-voices:/voices
57+
healthcheck:
58+
test: ["CMD", "curl", "-f", "http://localhost:4123/health"]
59+
interval: 30s
60+
timeout: 10s
61+
retries: 3
62+
start_period: 120s
63+
64+
volumes:
65+
chatterbox-models:
66+
# chatterbox-voices:

0 commit comments

Comments
 (0)