Watch
0
0
Fork
You've already forked hyperhive
0

swarm-stt: time-box a run and decode pipe-only

This commit is contained in:
damocles 2026-11-11 21:35:56 +01:00 • committed by mara
commit f8e1d0fbbd

View file

@ -31,11 +31,16 @@ into place with a rename, so a reader never sees half a transcript.
The `Engine` trait takes bytes and returns text. `Whisper` is the real one:
`ffmpeg` decodes any container to 16 kHz mono WAV, cutting it at `max_secs`,
and `whisper-cli` from whisper.cpp reads the WAV with the configured model and
language detection on. A scratch directory per run holds the WAV and goes away
with the run.
language detection on. Decoding is pipe-only (`-protocol_whitelist pipe`): the audio comes from
rooms with outside people, so a file that names other files or URLs gets no
way to open them. The service kills a run that outlasts its timeout (decode and transcribe
together) and fails the request, so one hung child can't hold the single
engine slot. A scratch directory per run holds the WAV and goes away with the run.
## Settings the daemon will expose
The model (default `small`), the cache TTL (default one day), the size and
length caps. The design and the choices behind them are in the discussion on
The model (default `small`), the cache TTL (default one day), the size,
length and run-time caps. The daemon change also owns a bound on how many
requests may wait for the engine slot, a sweep of scratch directories a crash
left behind, and whisper's thread count. The design and the choices behind them are in the discussion on
issue 6383.