pipecrab-vad: the voice-activity-detection interface.
One trait — [VoiceActivityDetector] — is the swappable VAD capability:
f32 samples in, a [VadVerdict] (is this window speech, and how sure?)
out. It mirrors pipecrab-stt's
Transcriber trait: the concrete engines — native ort-hosted Silero, the
browser onnxruntime-web build — live in their own crates behind this one
trait, so the pipeline above never names a model and the interface itself carries
no backend dependency. It compiles for the host and for
wasm32-unknown-unknown.
The trait only answers "speech or not, right now." [VadStage] layers the
segmentation on top: it runs the detector per window and collapses the
verdict stream into just the two edges of speech
(SpeechStarted /
SpeechStopped), so the
pipeline sees a handful of control frames, not a per-window flood.