diff --git a/docker-compose.yml b/docker-compose.yml index be8024d..9f63909 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,6 +69,10 @@ services: # MeloTTS on the GPU (cu128 torch baked by docker/setup-melo.sh). CPU synth # serialised under load and pushed TTS to 7-8s; GPU does ~0.3s/sentence. MELO_DEVICE: ${MELO_DEVICE:-cuda} + # Speaking rate for MeloTTS. Set here (with a default) so supervisord's + # %(ENV_MELO_SPEED)s passthrough always resolves and an .env override + # actually reaches the melo-worker. Lower it (e.g. 1.1) for a calmer pace. + MELO_SPEED: ${MELO_SPEED:-1.5} # Optional single-language lock for replies (empty = user's own language). OUTPUT_LANGUAGE: ${OUTPUT_LANGUAGE:-ko} # Drop the pre-loop planner LLM call to cut voice-reply latency on small diff --git a/docker/supervisord.conf b/docker/supervisord.conf index 9b49315..c512e1f 100644 --- a/docker/supervisord.conf +++ b/docker/supervisord.conf @@ -61,10 +61,13 @@ directory=/app ; HF_HUB_OFFLINE/TRANSFORMERS_OFFLINE force pure-cache reads: the pinned old ; transformers/huggingface_hub otherwise retry the network on every load and ; error out instead of falling back to the (complete) baked cache. -; MELO_DEVICE inherits from the container env (compose sets it; default cuda) -; so the worker runs MeloTTS on the GPU. supervisord interpolates %(ENV_x)s -; from its own environment, which is the container's. -environment=MELO_LANGUAGE="KR",MELO_SPEED="1.5",MELO_DEVICE="%(ENV_MELO_DEVICE)s",MELO_WORKER_HOST="127.0.0.1",MELO_WORKER_PORT="8770",HF_HOME="/opt/melo-cache",HF_HUB_OFFLINE="1",TRANSFORMERS_OFFLINE="1" +; MELO_DEVICE and MELO_SPEED inherit from the container env (compose sets both +; with defaults: cuda / 1.5) so the worker runs MeloTTS on the GPU at the +; configured rate. supervisord interpolates %(ENV_x)s from its own environment, +; which is the container's — so MELO_SPEED must always be set in the env +; (compose guarantees it) or this expansion fails at startup. Hardcoding 1.5 +; here previously shadowed the .env value, so lowering MELO_SPEED had no effect. +environment=MELO_LANGUAGE="KR",MELO_SPEED="%(ENV_MELO_SPEED)s",MELO_DEVICE="%(ENV_MELO_DEVICE)s",MELO_WORKER_HOST="127.0.0.1",MELO_WORKER_PORT="8770",HF_HOME="/opt/melo-cache",HF_HUB_OFFLINE="1",TRANSFORMERS_OFFLINE="1" priority=280 autorestart=true stdout_logfile=/dev/stdout