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:
20
.env.example
20
.env.example
@@ -36,12 +36,20 @@ WHISPER_DEVICE=cuda
|
||||
WHISPER_COMPUTE_TYPE=float16
|
||||
# Optional explicit Piper voice model (.onnx). If empty, the jarvis default is used.
|
||||
TTS_PIPER_MODEL_PATH=
|
||||
# TTS engine: "edge" (default) uses Microsoft Edge TTS, a natural Korean neural
|
||||
# voice. Set to "piper" for the offline English voice. NOTE: edge is ONLINE —
|
||||
# reply text is sent to Microsoft's servers and needs internet.
|
||||
TTS_ENGINE=edge
|
||||
# Edge voice + speaking rate. Rate is a percentage (+45% ≈ 1.45×). Korean voices:
|
||||
# ko-KR-HyunsuMultilingualNeural (M), ko-KR-InJoonNeural (M), ko-KR-SunHiNeural (F).
|
||||
# TTS engine:
|
||||
# melo (default) GPU MeloTTS — offline Korean voice, privacy-first (text never
|
||||
# leaves the host), synthesises on the GPU via the melo-worker. Needs a
|
||||
# GPU (MELO_DEVICE=cuda); falls back to CPU (slow) with MELO_DEVICE=cpu.
|
||||
# edge Microsoft Edge TTS — natural Korean neural voice, but ONLINE: reply
|
||||
# text is sent to Microsoft's servers and needs internet.
|
||||
# piper offline English voice (fallback).
|
||||
TTS_ENGINE=melo
|
||||
# GPU MeloTTS knobs (used when TTS_ENGINE=melo).
|
||||
MELO_DEVICE=cuda
|
||||
MELO_SPEED=1.5
|
||||
# Edge voice + speaking rate (used when TTS_ENGINE=edge). Rate is a percentage
|
||||
# (+45% ≈ 1.45×). Korean voices: ko-KR-HyunsuMultilingualNeural (M),
|
||||
# ko-KR-InJoonNeural (M), ko-KR-SunHiNeural (F).
|
||||
EDGE_TTS_VOICE=ko-KR-HyunsuMultilingualNeural
|
||||
EDGE_TTS_RATE=+45%
|
||||
# Neural-only by default: if synthesis fails the bridge returns no audio rather
|
||||
|
||||
Reference in New Issue
Block a user