aboutsummaryrefslogtreecommitdiffstats
path: root/CONTEXT.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 01:33:33 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 01:33:33 +0100
commit97a26ec4e64a98a24dad7969337d2569339db9a7 (patch)
treeada17e2b1f50d053a6bfe4067296e06de848ac87 /CONTEXT.md
parentconfig: harden the shared temp directory (diff)
downloadsenator-sperma-97a26ec4e64a98a24dad7969337d2569339db9a7.tar.gz
senator-sperma-97a26ec4e64a98a24dad7969337d2569339db9a7.zip
docs: sync with current behavior
Diffstat (limited to 'CONTEXT.md')
-rw-r--r--CONTEXT.md13
1 files changed, 7 insertions, 6 deletions
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/`).
10 Despite the name, it contains **no audio** — only timestamps and durations. 10 Despite the name, it contains **no audio** — only timestamps and durations.
11- **Recording** — capturing the *audio* of a voice channel into a rolling 11- **Recording** — capturing the *audio* of a voice channel into a rolling
12 in-memory buffer while the bot is connected. Distinct from *voice activity* 12 in-memory buffer while the bot is connected. Distinct from *voice activity*
13 (metadata). A bot "records" continuously while in a VC (unless opted out) and 13 (metadata). Recording is opt-in via `RECORDING_ENABLED` (default false); when
14 "flushes" on `/record`. 14 enabled a bot records continuously while in a VC and "flushes" on `/record`.
15- **Window** — the retention horizon of the recording buffer: how many seconds 15- **Window** — the retention horizon of the recording buffer: how many seconds
16 of the recent past are kept. Older audio is discarded as new audio arrives. 16 of the recent past are kept. Older audio is discarded as new audio arrives.
17 Configured via `RECORDING_WINDOW_SECONDS` (default 900 = 15 minutes). 17 Configured via `RECORDING_WINDOW_SECONDS` (default 900 = 15 minutes).
@@ -40,10 +40,11 @@ holds no implementation decisions or specs (those live in `docs/adr/`).
40 at the model's native sample rate (typically 22050 Hz mono), resampled to 40 at the model's native sample rate (typically 22050 Hz mono), resampled to
41 48 kHz stereo via inline linear interpolation before playback. Songbird does 41 48 kHz stereo via inline linear interpolation before playback. Songbird does
42 not resample — playing un-resampled audio results in wrong playback speed. 42 not resample — playing un-resampled audio results in wrong playback speed.
43- **TtsState** — struct held in poise `Data`: `OnceCell<Mutex<Piper>>` for the 43- **TtsState** — struct held in poise `Data`: `OnceLock<Arc<std::sync::Mutex<Piper>>>`
44 model instance, `DashMap<String, (Vec<u8>, Instant)>` for the text→audio cache. 44 for the model instance, `DashMap<String, (Vec<u8>, Instant)>` for the
45 Piper loaded lazily on first TTS call. Cache keyed by full phrase string, 45 text→audio cache. Piper is loaded lazily on first TTS call, off the async
46 evicted by TTL. No Google TTS fallback. 46 runtime. Cache is keyed by the full phrase, bounded by entries/bytes, and
47 evicted by TTL. No external TTS fallback.
47- **Pre-generation** — on first voice event for a user, synthesize all 6 event 48- **Pre-generation** — on first voice event for a user, synthesize all 6 event
48 phrases (join/leave/deafen/undeafen/mute/unmute) with their display name and 49 phrases (join/leave/deafen/undeafen/mute/unmute) with their display name and
49 cache them. ~120ms first time, instant after. Lazy — no startup cost. 50 cache them. ~120ms first time, instant after. Lazy — no startup cost.