Lesson 24 / Unit 7: Streaming Recognition
Causal Context
Find every dependency on future audio before calling the recognizer streaming.
A fast forward pass does not make an offline model causal. Our baseline uses future context in the backward GRU, symmetric convolution padding and whole-utterance normalisation. Its STFT configuration also requires a complete analysis frame before emitting that frame’s features.
Dependency Audit
| Stage | Baseline dependency | Incremental design question |
|---|---|---|
| Features | Complete window and utterance statistics | What buffering and normalisation state are retained? |
| Convolution | Symmetric context | Is future lookahead bounded or removed? |
| GRU | Forward and backward directions | Can the encoder operate with forward state only? |
| Decoder | Entire frame path | Which tokens remain provisional across chunks? |
Removing a backward direction changes the representation and requires training an appropriate model. It is not a serving flag that preserves the checkpoint’s behaviour.
Prefix Recompute
The lab can run the offline model on progressively longer prefixes. This shows how hypotheses change as more audio becomes available. It repeats earlier computation and is explicitly not a stateful streaming implementation.
The STFT interface helps identify frame boundaries, but streaming correctness also depends on every later stage. Testing only the feature extractor leaves the rest unaudited.
Chunk Equivalence
For a genuinely incremental implementation, compare a full causal pass with chunked passes using the same model and retained state. Check outputs at multiple boundaries, including boundaries inside repeated digits. Reset state only when the stream actually ends.
Continue with Partial Transcripts, which replays the measured prefix experiment. Serving Measurements separates compute time from user-visible delay.
We do this work for teams shipping voice agents: Self-Hosted Voice Agent .
Edit this lesson on GitHub ↗Discussion
Questions, corrections and war stories welcome. Sign in with GitHub to comment.