swarm-stt: time-box a run and decode pipe-only
This commit is contained in:
parent
df4b2f1838
commit
f8e1d0fbbd
1 changed files with 63 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue