Buffers an AudioFrame stream guided by VAD spans ([{start: Double, end: Double}]) and a turn-end Double probability, emitting one padded utterance AudioFrame per completed speech turn plus a Bool collecting flag.
Typical backends
Detect voice activity on incoming audio, buffer each turn, and transcribe the flushed utterance.
Use a dedicated end-of-turn detector for the turn-end probability and transcribe each completed utterance.
Caveats
- I/O contractThe utterance output emits only when a turn completes, while the collecting flag is produced every tick; downstream stages reading the utterance see bursts, not a per-tick stream.
- State lifetimeAudio is buffered in memory across ticks for the current turn only and flushed on turn end, so the buffer never grows beyond one utterance.
- Parameter interactionA turn flushes when the span list empties and the turn-end probability clears the threshold; an utterance shorter than the minimum duration is dropped, and one growing past the maximum is force-flushed early.
- I/O contractLeading and trailing padding windows are kept around the detected speech so onset consonants and trailing sounds are not clipped from the emitted clip.