Sign inSign up

thegmpteam/pockettts-server

By thegmpteam

•Updated 8 days ago

OpenAI-compatible TTS server powered by Pocket-TTS. CPU-optimized with streaming.

Image
0

602

thegmpteam/pockettts-server repository overview

⁠PocketTTS server

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⁠.

⁠Quick start

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

⁠API

MethodPathDescription
GET/healthReadiness and model status
GET/v1/voicesAvailable voice IDs
GET/v1/modelActive language and model
POST/v1/modelSwitch language/model
POST/v1/audio/speechGenerate speech (input, voice, response_format, stream)
POST/v1/voices/cloneBrowser-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")

⁠Environment variables

VariableDefaultDescription
POCKET_TTS_HOST0.0.0.0Bind address
POCKET_TTS_PORT49112Listen port
POCKET_TTS_VOICES_DIR/app/voicesVoices directory
POCKET_TTS_LANGUAGE(auto)Model language
POCKET_TTS_QUANTIZEfalseFull precision vs quantized
POCKET_TTS_TORCH_THREADS4Torch threads, applied by cpu_startup.py after Pocket's import-time reset
POCKET_TTS_INTEROP_THREADS1Torch interop threads
POCKET_TTS_STREAM_DEFAULTfalseStreaming by default
POCKET_TTS_LOG_LEVELINFOLog level
POCKET_TTS_LOG_DIR/app/logsLog 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.

⁠Volumes

PathPurpose
/app/voicesVoice files (mount read-only)
/app/logsLog output
/app/voice_cacheVoice cache
/home/pockettts/.cache/huggingfaceModel cache — persist to avoid re-downloading weights

⁠Tags

TagMeaning
betaCurrent published build (there is no latest tag yet)
sha-<commit>Immutable per-commit build

Platform: linux/amd64.

⁠What the image does not ship

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.

⁠Security

The server is unauthenticated by default. Keep it on loopback or a trusted LAN, not the public Internet. Obtain consent before cloning a voice.

⁠License

MIT (upstream copyright preserved). Pocket-TTS is subject to its own license terms.

Tag summary

Content type

Image

Digest

sha256:cd703828e…

Size

499.3 MB

Last updated

8 days ago

docker pull thegmpteam/pockettts-server