Expand description
pipecrab-stt: the speech-to-text interface.
StreamingTranscriber is the STT capability the conversation pipeline
drives: f32 audio a window at a time in, SttEvents out — partial
hypotheses while the user is still speaking, then a final transcript, which
is what a low-latency conversation loop needs. Concrete models stay behind
it, so the pipeline never names one.
An engine reaches that interface one of two ways:
- A native streaming engine (e.g. a streaming Zipformer) implements
StreamingTranscriberdirectly, emitting real partials. - A chunk-final engine (e.g. Moonshine) implements the simpler one-shot
Transcriber—f32samples in, one transcript out, no partials — and theBufferedadapter lifts it toStreamingTranscriberby accumulating the utterance and transcribing it once at the end. So a partial-less engine still plugs into the same streaming interface, without the pipeline knowing the difference.
SttStage adapts a StreamingTranscriber into a pipeline
Stage as a stateless protocol adapter.
§Format authority
Format authority flows from the party that knows the requirement, not from whatever the wire happens to carry. Stages reject fatally mismatched formats.
Platform-neutral and wasm32-checkable: the concrete engines live elsewhere
(native ort, browser Transformers.js in a Web Worker), each behind these
traits, so the interface itself carries no backend dependency and compiles for
both the host and wasm32-unknown-unknown.
Structs§
- Buffered
- Fits a one-shot
Transcriberto theStreamingTranscriberprotocol by buffering the whole utterance and transcribing it once at the end — the adapter for chunk-final engines like Moonshine that have no partial output. - SttStage
- Adapts any
StreamingTranscriberinto a pipelineStageas a stateless protocol adapter.
Enums§
- SttEffect
- One step of the utterance protocol:
SttStage’sProcessor::Effect. Emitted bydecide_*, interpreted byperform. - SttError
- Why a
Transcriber::transcribecall failed. - SttEvent
- An event emitted by a
StreamingTranscriberas an utterance progresses.
Traits§
- Streaming
Transcriber - A transcription session protocol for engines that emit partial results while audio is still arriving (e.g. a streaming Zipformer). One active utterance per engine instance.
- Transcriber
- The swappable speech-to-text capability:
f32samples in, a transcript out.