OpenAI-compatible TTS server powered by Pocket-TTS. CPU-optimized with streaming.
602
CPU-only OpenAI-compatible text-to-speech server powered by Pocket-TTS. Drop-in replacement for OpenAI's TTS API with streaming, custom voices and browser-upload voice cloning. No GPU required.
A customized distribution of teddybear082/pocket-tts-openai_streaming_server; the original MIT copyright and license are preserved. Part of the n8n AI stack.
docker pull thegmpteam/pockettts-server:beta
docker run -d \
--name pockettts-server \
-p 49112:49112 \
-v /path/to/voices:/app/voices:ro \
-v /path/to/logs:/app/logs \
thegmpteam/pockettts-server:beta
Open http://localhost:49112/ for the built-in web UI, or call the API directly.
curl http://localhost:49112/v1/audio/speech \
-H "Content-Type: application/json" \
-d '{"model":"tts-1","input":"Hello world!","voice":"alba"}' \
--output speech.mp3
| Method | Path | Description |
|---|---|---|
GET | /health | Readiness and model status |
GET | /v1/voices | Available voice IDs |
GET | /v1/model | Active language and model |
POST | /v1/model | Switch language/model |
POST | /v1/audio/speech | Generate speech (input, voice, response_format, stream) |
POST | /v1/voices/clone | Browser-upload voice cloning extension |
Speech parameters: model (ignored, OpenAI compatibility), input (required), voice (default alba), response_format (mp3, wav, pcm, opus, aac, flac), stream (boolean). WAV/PCM can stream; encoded formats return complete files.
OpenAI clients work as-is:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:49112/v1", api_key="not-needed")
resp = client.audio.speech.create(model="tts-1", voice="alba", input="Hello!")
resp.stream_to_file("output.mp3")
| Variable | Default | Description |
|---|---|---|
POCKET_TTS_HOST | 0.0.0.0 | Bind address |
POCKET_TTS_PORT | 49112 | Listen port |
POCKET_TTS_VOICES_DIR | /app/voices | Voices directory |
POCKET_TTS_LANGUAGE | (auto) | Model language |
POCKET_TTS_QUANTIZE | false | Full precision vs quantized |
POCKET_TTS_TORCH_THREADS | 4 | Torch threads, applied by cpu_startup.py after Pocket's import-time reset |
POCKET_TTS_INTEROP_THREADS | 1 | Torch interop threads |
POCKET_TTS_STREAM_DEFAULT | false | Streaming by default |
POCKET_TTS_LOG_LEVEL | INFO | Log level |
POCKET_TTS_LOG_DIR | /app/logs | Log directory |
CPU startup runs cpu_startup.py, which applies the thread settings after Pocket's import-time thread reset. Set CPU quotas separately with --cpus / compose limits.
| Path | Purpose |
|---|---|
/app/voices | Voice files (mount read-only) |
/app/logs | Log output |
/app/voice_cache | Voice cache |
/home/pockettts/.cache/huggingface | Model cache — persist to avoid re-downloading weights |
| Tag | Meaning |
|---|---|
beta | Current published build (there is no latest tag yet) |
sha-<commit> | Immutable per-commit build |
Platform: linux/amd64.
No model weights, Hugging Face tokens, certificates, logs, clone registry or voice recordings — CI fails the build if any appear. First model startup may download weights. Gated cloning weights require you to accept their terms and supply credentials privately.
The server is unauthenticated by default. Keep it on loopback or a trusted LAN, not the public Internet. Obtain consent before cloning a voice.
MIT (upstream copyright preserved). Pocket-TTS is subject to its own license terms.
Content type
Image
Digest
sha256:cd703828e…
Size
499.3 MB
Last updated
8 days ago
docker pull thegmpteam/pockettts-server