diff options
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -23,7 +23,7 @@ src/ | |||
| 23 | ├── events/mod.rs — handle_ready, handle_voice_state_update, handle_message | 23 | ├── events/mod.rs — handle_ready, handle_voice_state_update, handle_message |
| 24 | ├── openrouter/mod.rs — OpenRouterClient (chat, chat_with_history) | 24 | ├── openrouter/mod.rs — OpenRouterClient (chat, chat_with_history) |
| 25 | ├── tasks/mod.rs — cron_scheduler_loop (30s polling, stub exec bodies) | 25 | ├── tasks/mod.rs — cron_scheduler_loop (30s polling, stub exec bodies) |
| 26 | ├── tts.rs — synthesize(): Piper subprocess → Google TTS fallback | 26 | ├── tts.rs — TtsState (piper-rs in-process, DashMap cache, pre-gen, resampler, WAV encoder) |
| 27 | └── voice/mod.rs — VoiceManager (connect, disconnect, get_call), mp3_to_input | 27 | └── voice/mod.rs — VoiceManager (connect, disconnect, get_call), mp3_to_input |
| 28 | ``` | 28 | ``` |
| 29 | 29 | ||
| @@ -35,6 +35,10 @@ src/ | |||
| 35 | - **Shared state**: `Data` struct in `main.rs` — passed as poise `user_data` | 35 | - **Shared state**: `Data` struct in `main.rs` — passed as poise `user_data` |
| 36 | - **Commands**: each submodule exports `pub fn commands() -> Vec<poise::Command<Data, Error>>` | 36 | - **Commands**: each submodule exports `pub fn commands() -> Vec<poise::Command<Data, Error>>` |
| 37 | - **Temp path**: always use `crate::config::TEMP_PATH` (resolves to `/tmp/senator_sperma`) | 37 | - **Temp path**: always use `crate::config::TEMP_PATH` (resolves to `/tmp/senator_sperma`) |
| 38 | - **TTS**: piper-rs in-process (no subprocess). `TtsState` in `Data` holds `OnceLock<Mutex<Piper>>` + `DashMap` cache. Synthesize via `data.tts.synthesize(text)`. Pre-generates 6 event phrases per user on first voice event. No Google TTS fallback. | ||
| 39 | |||
| 40 | ## Build | ||
| 41 | - `build.rs` — compiles C stubs for espeak-rs-sys missing sonic/audio_object symbols | ||
| 38 | 42 | ||
| 39 | ## Stubs to Fill (see COMPARISON.md) | 43 | ## Stubs to Fill (see COMPARISON.md) |
| 40 | - `commands/music.rs` — `/play` is placeholder | 44 | - `commands/music.rs` — `/play` is placeholder |
