feat(tts): default to offline GPU MeloTTS with brain-role worker

Switch the default TTS engine from online Edge TTS to offline GPU
MeloTTS (privacy-first: reply text never leaves the host). Adds a
supervisord melo-worker program that runs in full/bot/brain roles and
synthesises Korean on the GPU (MELO_DEVICE=cuda, MELO_SPEED=1.5), a
baked /opt/melo py3.11 venv layer in the Dockerfile, and compose/env
defaults. Edge TTS stays available as an opt-in online fallback via
TTS_ENGINE=edge.

Verified on the RTX 5050 (Blackwell sm_120): melo-worker logs
"ready (lang=KR speed=1.5 device=cuda)", /health returns ok, and a
/synth round-trip returns a 177KB WAV.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-07-22 20:39:54 +09:00
parent 8562548571
commit bb60c4db3b
5 changed files with 65 additions and 20 deletions

View File

@@ -100,13 +100,16 @@ BRIDGE_HOST=0.0.0.0 # bridge listens on the LAN
SETTINGS_PUBLISH_BIND=0.0.0.0 # publish bridge port 8765 to the LAN
OLLAMA_BASE_URL=http://192.168.10.9:11434 # Ollama on this host (bind 0.0.0.0)
OLLAMA_CHAT_MODEL=qwen2.5:7b
WHISPER_DEVICE=cuda
WHISPER_DEVICE=cuda # STT on the GPU
WHISPER_COMPUTE_TYPE=float16
TTS_ENGINE=melo # GPU MeloTTS (offline, privacy-first)
MELO_DEVICE=cuda # TTS on the GPU (melo-worker)
BROWSER_CONTROL_URL=http://192.168.10.5:8777 # drive the app host's Chrome
COMPOSE_FILE=docker-compose.yml:docker-compose.gpu-linux.yml # GPU (":" on Linux)
# Ollama runs on this host (systemd or a container) listening on 0.0.0.0:11434.
docker compose up -d javis # brain bridge only (no bot, no desktop)
# STT (Whisper), LLM (Ollama) and TTS (MeloTTS) all run on this host's GPU.
# Ollama listens on 0.0.0.0:11434 (systemd or a container).
docker compose up -d javis # brain bridge + melo-worker only (no bot, no desktop)
```
### App host (.5 — bot + browser, no GPU)