Skip to content
mlmentorship

Streaming automatic speech recognition

Emit transcripts with bounded latency using chunked encoders, monotonic alignment, endpointing, and stability-aware evaluation.

Published · 7 min read ·Specialist ·Advanced
Reading depth

Summary

Show tentative words before speech ends, but define when they may change and when the transcript becomes final.

Problem

One synthetic trace uses a shared clock, not measured service guarantees:

EventTime
Speech starts0 ms
First word ends300 ms
First displayed partial includes that word460 ms
Speech ends1,200 ms
Final text appears1,550 ms

The first partial is “play the”; later audio changes it to “play their song”. Compute first-text, word-emission and finalization delays without changing their anchors. Separately, a ten-second clip needs two seconds of processing. Does that compute ratio certify the live experience?

Picture: Useful Early Text Can Still Change

Learning objective

Visible partial words remain revisable until the finalization rule permits commitment

Visible partial words remain revisable until commitmentThe partial hypothesis changes as audio arrives. Only the declared finalization rule turns a provisional token sequence into committed output.Visible hypotheses remain revisablebefore finalizationProvisional hypothesisIscreamProvisional hypothesisicecreamFinalization receipt: committedicecream
Derivation
A streaming transcript changes from provisional to final as audio arrives Audio arrives from left to right as the words play, their, and song, followed by a pause. After a bounded chunk and right-context wait, the recognizer emits the provisional words play the. Once the word song arrives, the recognizer revises the to their and adds song. Only after an endpointing wait during the pause does it mark play their song final. Thus first-token latency ends before speech ends, while finalization latency includes endpointing. AUDIO ARRIVES LEFT TO RIGHT · CONCEPTUAL, NOT TO SCALE /play/ /their/ /song/ pause / wait CHECKPOINT 1 · EARLY PARTIAL · 460 ms chunk + bounded right context are available play the… PROVISIONAL future audio may revise text CHECKPOINT 2 · LATER PARTIAL play their song the → their REVISED speech stops; endpoint must fire FINAL RESULT · 1550 ms play their song FINAL
compare partial, revised and final text, not geometric distances on this schematic clock. First text precedes speech end; finalization includes endpointing and remaining delivery.
Check: Why can play their song be visible before the system is allowed to mark it final?
Read it this way: The partial hypothesis changes as audio arrives. Only the declared finalization rule turns a provisional token sequence into committed output.
Can the first visible I scream be treated as final words?

Calculate Distinct Delays

MeasurementCalculationResult
First text from speech start460 - 0460 ms
This word’s emission from word end460 - 300160 ms
Finalization from speech end1,550 - 1,200350 ms
Separate clip’s real-time factor2 / 100.2

Real-time factor is processing duration divided by audio duration. It does not bound queueing, network delivery, revision frequency or finalization tails. Measure stable-prefix time separately; an early partial is not necessarily stable.

Endpointing and partial stability

For word-token indices, keep “play” stable and replace range of the first partial with [“their”, “song”]. Advance the version; later mark the unchanged full transcript final. Declare replacement ranges, stable-prefix length, endpoint state and reconnect/reset behavior. Reject stale updates or changes to committed prefixes.

Aggressive endpointing can clip pauses; conservative endpointing delays finalization. Keep tentative state reversible and measure false endpoints alongside delay. Provisional words do not authorize consequential actions. Even final text can require separate semantic, permission and confirmation checks.

Change 1: More Future Context

New task. Additional lookahead helps recognition but threatens the deadline.

Picture and change. Measure actual critical-path delay, quality and cache cost under live load.

Check. Overlap changes incremental delay; model runtime alone is insufficient.

Use when. Context and responsiveness conflict.

Change 2: Pauses Cause Premature Finalization

New task. The endpoint closes an unfinished request.

Picture and change. Adjust endpoint/stability policy and test pauses, rushed speech, noise and interruption.

Check. Lower mean delay can hide worse false-endpoint and task-completion rates.

Use when. Commitment errors dominate.

Evaluation

GroupRequired observation
RecognitionFinal/streaming WER with fixed normalization
DelayNamed first-text, word, stable-prefix and final anchors, including tails
StabilityRevisions/edit overhead and false endpoints
ResourcesReal-time factor, peak compute, queue/cache behavior
SlicesAccent, noise, device, language and speech rate

Failure: Good Final WER Arrives Too Late

Accurate final text can miss a live task’s deadline. Acting on a subsequently revised provisional word creates a different failure.

Transfer Check

Does streaming require batch size one?

Reasoned Answer

No. Independent live streams may be batched while preserving bounded future context, state and output deadlines.

Architecture choices

RouteRuntime contract
Chunked encoderBounded windows/lookahead, persistent caches
RNN-TTime/token decoding with streaming-compatible encoder/state
CTCFrame objective with compatible front end, encoder and search
Streaming attentionExplicitly constrained/chunked context, not full-utterance dependence

Latency components

Trace chunk buffering, feature extraction, lookahead, compute, decoding, endpointing, queueing, network and client rendering. Overlap matters; measure end-to-end distributions from joint traces, not sums of stage percentiles. Offline processing still has resource and deadline constraints even without live-context restrictions.

PartialUpdate
	utterance_id, stream_epoch, version, token_replace_range
	tokens, stable_prefix_length, final, endpoint_state
	audio_event_time, display_time, model_policy_version

Bind replacements to the utterance/epoch and increasing version. On reconnect, explicitly resume acknowledged state or reset; do not mix caches across utterances. Specify stale/missing updates, bounded queues and safe timeout/fallback behavior. Later offline rescoring needs a distinct result identity and cannot silently rewrite an already consumed final result.

In an interview

  1. Fix latency anchors and quality/stability targets.
  2. Declare context, chunk, cache and decoding policy.
  3. Trace buffering through client display.
  4. Define tentative, stable, endpoint and final states.
  5. Test fallback, rescoring, interruptions and slice monitoring.

Common confusions

Low WER is not a delay bound; extra context changes the actual critical path, not necessarily every frame additively.

Sources

Related: automatic speech recognition, RNN-T, and CTC.