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) --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index f5a78ee..a074a43 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ src/ │ ├── music.rs — /play (🟡 stub), /stop, /join, /loop_toggle │ ├── qr.rs — /qr encode + decode │ ├── trigger.rs — /trigger group (6 subcommands) -│ ├── tts.rs — /tts (Google TTS → file/vc), /log_volume +│ ├── tts.rs — /tts (local Piper TTS → file/vc), /log_volume │ ├── utilities.rs — compress🟡, convert🟡, upload, search, download, say │ └── web.rs — /web (DuckDuckGo scrape) ├── copyparty/mod.rs — CopypartyClient (search, upload) @@ -23,6 +23,7 @@ src/ ├── events/mod.rs — handle_ready, handle_voice_state_update, handle_message ├── openrouter/mod.rs — OpenRouterClient (chat, chat_with_history) ├── tasks/mod.rs — cron_scheduler_loop (30s polling, stub exec bodies) +├── tts.rs — synthesize(): Piper subprocess → Google TTS fallback └── voice/mod.rs — VoiceManager (connect, disconnect, get_call), mp3_to_input ``` -- cgit v1.2.3