From 97a26ec4e64a98a24dad7969337d2569339db9a7 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 01:33:33 +0100 Subject: docs: sync with current behavior --- CONTEXT.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 278420f..5a992ec 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -10,8 +10,8 @@ holds no implementation decisions or specs (those live in `docs/adr/`). Despite the name, it contains **no audio** — only timestamps and durations. - **Recording** — capturing the *audio* of a voice channel into a rolling in-memory buffer while the bot is connected. Distinct from *voice activity* - (metadata). A bot "records" continuously while in a VC (unless opted out) and - "flushes" on `/record`. + (metadata). Recording is opt-in via `RECORDING_ENABLED` (default false); when + enabled a bot records continuously while in a VC and "flushes" on `/record`. - **Window** — the retention horizon of the recording buffer: how many seconds of the recent past are kept. Older audio is discarded as new audio arrives. Configured via `RECORDING_WINDOW_SECONDS` (default 900 = 15 minutes). @@ -40,10 +40,11 @@ holds no implementation decisions or specs (those live in `docs/adr/`). at the model's native sample rate (typically 22050 Hz mono), resampled to 48 kHz stereo via inline linear interpolation before playback. Songbird does not resample — playing un-resampled audio results in wrong playback speed. -- **TtsState** — struct held in poise `Data`: `OnceCell>` for the - model instance, `DashMap, Instant)>` for the text→audio cache. - Piper loaded lazily on first TTS call. Cache keyed by full phrase string, - evicted by TTL. No Google TTS fallback. +- **TtsState** — struct held in poise `Data`: `OnceLock>>` + for the model instance, `DashMap, Instant)>` for the + text→audio cache. Piper is loaded lazily on first TTS call, off the async + runtime. Cache is keyed by the full phrase, bounded by entries/bytes, and + evicted by TTL. No external TTS fallback. - **Pre-generation** — on first voice event for a user, synthesize all 6 event phrases (join/leave/deafen/undeafen/mute/unmute) with their display name and cache them. ~120ms first time, instant after. Lazy — no startup cost. -- cgit v1.2.3