How streaming speech recognition works
People see speech-to-text as a magic box. Speak into a microphone and words appear on screen. But when you are the one building the integration, the magic box has a lot of sharp edges inside.
I spent years at Deepgram working with developers who were integrating streaming speech recognition into their applications. The most common question was not "which model has the best accuracy?" It was "why does this work differently in production than it did in my test suite?"
The answer is usually the same: streaming changes everything. A speech recognition model that scores 5 percent Word Error Rate on a benchmark dataset can fail completely on a live audio stream if the pipeline around it is wrong.
This is a look at how streaming speech recognition actually works under the hood. The architecture, the tradeoffs, and the edge cases that production systems eat for breakfast.
What makes streaming speech recognition different from batch
Batch speech recognition is simple. You have a complete audio file. You send it to an API. You wait for the transcript. The model has access to the full audio context when it transcribes any individual word.
Streaming speech recognition does not have that luxury. The audio arrives in chunks over a WebSocket connection. The model has to produce partial results before it has heard the full sentence. It has to decide, in real time, whether a pause between words is the end of a sentence or just someone taking a breath.
This is the fundamental difference between offline and streaming ASR. An offline model can look at the whole recording and figure out what was said. A streaming model has to guess, commit to a hypothesis, and sometimes be wrong before it gets more context.
The streaming constraint changes everything about how the system is built:
- The audio pipeline has to handle chunks, not files.
- The decoder has to produce partial transcripts without full context.
- The model has to deal with network jitter, packet loss, and variable audio quality.
- The application has to manage state across a long-lived WebSocket connection.
Batch and streaming ASR solve the same problem with different architectures. Most of the complexity in streaming comes from the real-time constraint, not from the speech model itself.
How the audio pipeline works from microphone to API
The journey from sound waves to text starts long before the speech model sees any audio. The audio pipeline is where most streaming integration bugs live.
A typical streaming STT pipeline looks like this:
- Audio capture: the microphone or audio source produces raw PCM samples at a specific sample rate (usually 16000 Hz for speech recognition).
- Encoding: the raw audio is encoded into a transport format (linear PCM, WAV, FLAC, or Opus).
- Transmission: the encoded audio is sent over a WebSocket connection in chunks.
- Decoding: the server decodes the incoming audio back into PCM samples.
- Preprocessing: the audio is normalized, filtered, and prepared for the model.
- Inference: the speech model processes the audio and produces text hypotheses.
- Streaming output: partial results are sent back to the client as they become available.
Every step in this pipeline adds latency. The total end-to-end latency for a production streaming STT system in 2026 is typically between 200 and 500 milliseconds for first-word latency. Optimization at any step can shave tens of milliseconds, but the hard ceiling is the model inference time.
The chunk size matters more than most developers expect. Small chunks (100 milliseconds) minimize first-word latency but give the model less audio context per inference. Large chunks (500 milliseconds) improve accuracy at the cost of responsiveness. There is no right answer. The tradeoff depends on your application.
Voice activity detection sits between steps 4 and 5. A VAD system identifies which audio chunks contain speech and which are silence. This matters because sending silence through the model wastes compute and can confuse the streaming decoder. Most production systems use a separate VAD model running in parallel with the speech model.
Acoustic models, language models, and the decoder
A streaming speech recognition system has three major components that work together to turn audio into text.
The acoustic model maps audio features to phonemes or subword units. It takes the preprocessed audio and produces a probability distribution over possible speech sounds for each time step. In a streaming system, the acoustic model operates on a sliding window of audio frames. It cannot look ahead at future frames, which limits its ability to resolve ambiguous sounds that become clear only in context.
The language model constrains the acoustic model’s output based on what is linguistically probable. It assigns probabilities to sequences of words or subword tokens. A language model knows that "I went to the" is probably followed by "store" or "park", not "quantum" or "xylophone". In streaming ASR, the language model has to work with partial hypotheses, which makes rescoring harder than in batch systems.
The decoder combines the acoustic model and language model outputs to produce the final transcript. This is where the real-time constraint bites hardest. A batch decoder can run a full beam search over the utterance, exploring multiple hypotheses and picking the best one. A streaming decoder has to commit to partial transcripts and revise them as new audio arrives.
The most common streaming decoder architecture in 2026 is the transducer model, which jointly optimizes the acoustic model, language model, and decoder into a single end-to-end neural network. Transducer models produce a stream of output tokens as audio arrives, without waiting for utterance boundaries. They handle the streaming constraint natively, which is why they dominate production ASR systems.
Older architectures separate the three components. A hybrid system uses a separately trained acoustic model (usually a factored time-delay neural network or a Conformer), a separate language model (usually an n-gram or neural LM), and a weighted finite-state transducer decoder that combines them during inference. Hybrid systems are still deployed in environments that need fine-grained control over the language model, like medical transcription with custom terminology.
Why interim results are hard to get right
Interim results are partial transcripts that the system emits before the user finishes speaking. They are what makes streaming feel real time. They are also where the most surprising bugs live.
The core problem is that a partial utterance is ambiguous. "I went to the" could become "I went to the store" or "I went to the gym" or "I went to the theatre last night." The streaming decoder has to make a best guess and update it as more audio arrives.
This produces a phenomenon called instability. The interim transcript changes as the model revises its hypothesis. A word that appeared in the first interim result might disappear or change in the second. This is normal behavior for a streaming ASR system, but it looks like a bug to users who expect text to be stable once it appears.
Applications that display interim results have to handle this instability. Captioning systems usually show interim text in a different style (grayed out, italic) and promote it to final text only when the system commits. Voice agent systems often ignore interim results entirely and act only on final transcripts.
The emission policy determines when the system commits to a final transcript segment. Some systems commit after a fixed silence period (500 milliseconds of no speech). Others use a learned end-of-utterance detector. Each approach has tradeoffs. Fixed silence periods are simpler but miss fast back-and-forth conversation. Learned detectors are more responsive but add latency when they hesitate.
Latency and accuracy tradeoffs in the real world
The relationship between latency and accuracy in streaming ASR is not linear. Small latency improvements come at a disproportionate accuracy cost near the low-latency end of the curve.
The main levers are:
-
Chunk size. Smaller chunks reduce latency by letting the model start inference sooner. But each chunk has less audio context, which increases Word Error Rate. The typical sweet spot is 320 to 480 milliseconds of audio per chunk for English.
-
Beam width. A wider beam search explores more hypotheses, improving accuracy at the cost of latency. Narrowing the beam from 5 to 1 roughly doubles inference speed while increasing WER by 1 to 2 percent on clean audio.
-
Model size. Larger models are more accurate and slower. Distilled or quantized models are faster and less accurate. The tradeoff depends on whether you are running on a server GPU or an edge device.
-
Emission frequency. Emitting interim results more frequently makes the system feel faster but increases the UI complexity of handling unstable text. Most production systems emit every 100 to 250 milliseconds.
-
VAD aggressiveness. An aggressive VAD cuts off silence faster, reducing latency at the end of utterances. It also risks cutting off speech during pauses, causing truncated transcripts.
In practice, production systems optimize for the application’s specific latency budget. A live captioning system for a conference needs 300 to 500 millisecond end-to-end latency. A voice agent for customer support can tolerate 800 milliseconds. A dictation app needs under 200 milliseconds. Each target changes the optimal configuration.
What happens when audio quality drops
Production streaming STT systems encounter audio quality problems that benchmark datasets do not capture. The common failure modes are:
-
Sample rate mismatch. The API expects 16000 Hz audio, but the client sends 44100 Hz. The model processes the audio without resampling, producing garbled transcripts. This is the most common integration bug I have seen.
-
Background noise. A streaming VAD can mistake background noise for speech, triggering false transcription. The model then produces hallucinated text from noise, which the application has to filter out.
-
Codec artifacts. Compressed audio codecs like Opus and MP3 introduce artifacts that degrade recognition accuracy. Opus at 32 kbps is generally fine for speech. Opus at 8 kbps loses information that the model depends on.
-
Network jitter. Variable network latency causes audio chunks to arrive out of order or with gaps. The streaming decoder has to handle missing context without breaking the entire transcript.
-
Clipping. Audio that exceeds the microphone’s dynamic range introduces distortion that significantly increases WER. This is especially common on cheap headsets and conference room microphones.
Production systems handle these problems with preprocessing. A noise suppressor filters background audio before it reaches the model. A resampler converts any input sample rate to the model’s expected rate. A jitter buffer reorders and interpolates audio chunks before sending them to the decoder.
The lesson I learned from debugging production integrations is that audio quality determines accuracy more than model selection does. A better model on bad audio is worse than a weaker model on clean audio.
How to build a reliable streaming STT integration
The principles for building a streaming STT integration that works in production are consistent across every API I have worked with.
Send audio at the sample rate the API expects. Do not assume the API resamples for you. Most production APIs expect 16000 Hz mono PCM audio. If your audio source produces anything else, resample it before transmission.
Chunk consistently. Send audio chunks at regular intervals, usually every 100 to 500 milliseconds. Irregular chunk timing confuses the streaming decoder and increases latency variance.
Handle WebSocket reconnection. Streaming connections drop. Your integration should detect disconnection, reconnect, and resume transcription. Some APIs support sending a context identifier on reconnect so the model can continue from where it left off.
Process final transcripts, not interim ones. Final transcripts are stable. Interim transcripts change. Unless your application specifically needs to display live captions, act only on final results.
Test with real network conditions. A local test against an API on the same network does not predict production behavior. Test with simulated latency, packet loss, and bandwidth constraints. The bugs that only appear under real network conditions are the ones that will wake you up at 3 AM.
Frequently asked questions
Why does streaming speech recognition sometimes change earlier words?
The streaming decoder produces interim results based on partial audio context. As more audio arrives, the decoder can revise its earlier hypothesis if the new context contradicts it. This is called instability and it is normal. Applications that display live captions handle this by showing interim text in a different visual state until the system commits.
What is the difference between a transducer model and a hybrid model for streaming ASR?
A transducer model is an end-to-end neural architecture that combines acoustic modeling, language modeling, and decoding into a single network. It produces output tokens as audio arrives without waiting for utterance boundaries. A hybrid model uses separate components for each stage: a neural acoustic model, a separate language model, and a finite-state decoder. Transducer models are simpler to deploy and dominate production systems in 2026. Hybrid models offer more control over the language model for specialized domains.
Why does my streaming STT integration work in testing but fail in production?
The most common cause is audio quality differences between your test environment and production. Test audio recorded on a good microphone in a quiet room has different characteristics than production audio from users on varied hardware in noisy environments. Network latency and jitter also affect streaming behavior in ways that local testing does not capture. Add audio preprocessing, test with realistic audio conditions, and verify your chunk timing before shipping.
How important is the sample rate for speech recognition accuracy?
Sample rate is the single most important audio parameter for ASR accuracy. Most production speech recognition models are trained on 16000 Hz audio. Sending audio at a different sample rate without resampling will produce significantly worse results. The model may still return a transcript, but the accuracy will drop by 10 to 30 percent WER depending on the rate mismatch.
Can I use batch speech recognition APIs for real-time applications?
Batch APIs are designed for pre-recorded audio and typically have higher latency and no interim results. They work for applications where the full audio is available before transcription starts, like processing voicemail or recorded meetings. They do not work for live applications like voice agents or real-time captioning, which need sub-second response and partial transcript output.