From b252c39517b9fce181d1a0fe4761404c7d981397 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 18 Aug 2026 23:18:37 +0200 Subject: feat: local TTS via piper subprocess with Google fallback - New src/tts.rs: centralize TTS in synthesize(config, http_client, text) Piper subprocess primary, Google Translate fallback on error/missing - TTS_MODEL_PATH/TTS_VOICE env config (defaults to pl_PL-bass-high) - Fix Unknown interaction errors: spawn play_tts_in_channel in background so voice-state TTS no longer blocks the shard event loop (3s Discord limit) - Best-effort confirmation replies in /tts to prevent error cascade - Custom on_error handler: graceful interaction-expired error handling - Comprehensive tracing logging (engine, model, duration, stderr) --- .env.example | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to '.env.example') diff --git a/.env.example b/.env.example index fe76c05..01e24b3 100644 --- a/.env.example +++ b/.env.example @@ -3,13 +3,17 @@ TOKEN= # Optional - Bot Configuration STATUS_CHANNEL_ID= -ASSISTANT_KEYWORD=jarvis # Keyword to trigger AI assistant # Optional - Copyparty File Server (for music /search commands) COPYPARTY_URL=http://localhost:8080 COPYPARTY_URL_UPLOAD=http://localhost:8080/uploads COPYPARTY_PASSWORD= -# Optional - AI commands +# Optional - AI functionality +ASSISTANT_KEYWORD=jarvis # Keyword to trigger AI assistant OPENROUTER_API_KEY= OPENROUTER_MODEL= + +# Optional - Local TTS +TTS_MODEL_PATH=/path/to/models # or a full path to pl_PL-bass-high.onnx +TTS_VOICE=pl_PL-bass-high -- cgit v1.2.3