Streaming STT Latency on Serverless GPU: A Budget

Connor Blier
Founding GTM

A microphone with its diaphragm shown as concentric rounded bars, flanked on each side by two short vertical signal bars representing streaming audio waveforms.

Streaming STT Latency on Serverless GPU: A Budget

Streaming speech-to-text latency over WebSockets on serverless GPU is a budget, not a single number: transport, model inference (real-time factor), partial-versus-final emission, and the cold-start tax each add their own milliseconds. Keep end-to-end under 300ms by sizing every term, and warm the GPU so cold starts never hit a live turn.

Streaming speech-to-text (STT) latency over WebSockets on serverless GPU behaves like a budget, not a reading on a single gauge. The number a user feels is the sum of four terms, and each one responds to a different lever. Optimise the one that is already small and you waste effort; miss the one that dominates and your voice agent stutters. This guide treats end-to-end latency as an explicit budget a Lead ML Engineer can allocate, measure, and defend.

Why streaming STT latency is a budget, not a number

The industry target for streaming transcription is well established. Deepgram frames the goal as sub-300ms end-to-end latency, while AssemblyAI defines real-time STT as a live audio stream converted to text over a persistent WebSocket with latency under one second. Those are envelopes, not line items. To hit them reliably you have to decompose the number into components you can each attack: transport, inference, emission, and the cold-start tax. For a broader view of where milliseconds leak across a pipeline, see our write-up on network latency in the AI inference pipeline.

The four-component latency budget

  1. Transport - the WebSocket round trip for audio up and transcripts down.

  2. Inference / RTF - how fast the model turns audio into tokens, governed by real-time factor.

  3. Emission - when partial versus final transcripts are released, which splits perceived from committed latency.

  4. Cold-start tax - the one-time penalty when a serverless GPU spins from zero, which can dwarf every other term combined.

Budget each term separately, then add them. The sections below give the short, complete answer for each.

WebSocket transport

WebSocket is the default transport for streaming STT because audio and recognition results must travel concurrently over one persistent, bidirectional connection. ElevenLabs describes it as "a long-lived, ordered, reliable, bidirectional channel over TCP" that traverses the proxies and firewalls already allowing HTTPS. A good setup delivers audio "in the low hundreds of milliseconds, from spoken word to your app," with MeetStream citing roughly 200ms for live WebSocket streaming.

The practical mechanics: send audio in small binary chunks at real-time rate. Deepgram slices audio into 100-200ms chunks so the recognizer never waits for a full sentence; Soniox notes the tradeoff plainly - "smaller frames mean lower latency and more messages. Larger frames mean fewer messages and slightly more lag." Do not dump a whole file down the socket at once; as Soniox puts it, that "is an upload wearing a costume," and late chunks leave the recognizer idle.

One caveat on reliability: WebSocket runs over TCP, so "every byte arrives in order, even if that means waiting" - head-of-line blocking under packet loss, where WebRTC over UDP would conceal the drop. For most server-to-server STT this is an acceptable trade.

Partial and final transcripts

Emission timing splits perceived latency from committed latency. A partial result is "the recognizer's current best guess" and can still change; a final result "is committed and will not change." Render partials fast for responsiveness, but, per Soniox's rule that prevents most live-transcription bugs, "render partials, but act on finals." Time-to-first-token - the elapsed time from speaker audio to first transcribed words - is the perceived-latency metric worth instrumenting; leading providers report it in the 64-150ms range, with Smallest AI's Pulse at 64ms and ElevenLabs Scribe v2 Realtime around 150ms over WebSockets.

Real-time factor and GPU inference

Inference latency is governed by real-time factor (RTF): processing time divided by audio duration. As Dialpad explains, five seconds of audio transcribed in five seconds is an RTF of one - "for these systems, we are generally looking for RTF values that are less than one." An RTF at or above 1.0 means the backlog grows and latency climbs without bound, so RTF < 1.0 is the non-negotiable condition for true streaming. There is a quality dimension too: arXiv work on fragmentation shows VAD-based splitting gives the best quality at the highest delay, while fixed-interval chunking gives the lowest delay at lower quality. Running the model on a GPU you control is what buys headroom here. On Whisper specifically, our guide to maximising Faster-Whisper performance covers the inference tuning, and our Ultravox deployment shows a full speech pipeline reaching 600ms first-time-to-audio end to end.

The serverless GPU cold-start problem

This is the term that sinks voice agents, and it is the one angle most latency guides ignore. A serverless GPU cold start is "a stack of sequential delays, container pull, model-weight load, and CUDA graph warmup, that can take 30 to 90 seconds." Container image pull dominates - 4-8 minutes uncached for 15-18 GB images - while weight loading runs ~8s for small models and 40-45s for 70B, and CUDA graph warmup adds 10-30s. The gap is stark: cold starts exceeding 40 seconds to first token against ~30ms per token warm, a 1000x latency gap. Against a voice turn's sub-second budget, "a multi-second gap is a dropped call."

The mitigation is to never serve a live turn from a cold container: keep warm pools / reserved replicas so a GPU is always hot, and shrink the phases that remain. We cover the full anatomy and fixes in serverless GPU cold starts for voice AI, and the weight-load phase specifically in loading model weights from object storage.

Setting production latency targets

Self-hosting the STT model next to the rest of the pipeline is what collapses the transport-plus-inference terms. In Cerebrium's own testing we measured Deepgram STT at ~110ms TTFB hosted on Cerebrium versus ~250ms through the hosted API - a 140ms saving on a single term. A reasonable production allocation, built only from figures above:

Budget termTarget
WebSocket transport~200ms round trip (low hundreds of ms)
Audio chunk size100-200ms binary frames
STT inference (RTF)< 1.0
Time-to-first-token64-150ms
STT TTFB (self-hosted)~110ms
End-to-end target< 300ms
Cold-start tax (live turns)0 - served warm

Putting it together: reference flow

Audio is captured and framed into ~100ms binary chunks, pushed up a persistent WebSocket at real-time rate. A warm serverless GPU runs the STT model at RTF < 1.0, emitting partials for the UI and finals for downstream actions. Because the GPU is held warm, the cold-start tax is zero on every live turn. Size the fleet from concurrency per GPU - our concurrent voice sessions per GPU numbers are the input - and if STT is one stage of a full agent, our Pipecat voice agent GPU deployment guide stitches the stages together, while speech-to-speech vs cascaded latency covers the architectural choice above it. For a full 500ms-latency reference agent, see deploying a global-scale voice agent.

Frequently asked questions

What is a good end-to-end latency target for streaming STT over WebSockets?
Under 300ms end to end is the common streaming target, and real-time STT is generally defined as transcription over a persistent WebSocket with latency under one second. Decompose the number into transport, inference, emission, and cold-start terms and budget each.
How large should audio chunks be for low-latency streaming STT?
Send small binary frames at real-time rate - 100-200ms chunks are typical. Smaller frames lower latency but add message overhead; larger frames reduce messages but add lag. Never upload a whole file at once.
What is real-time factor and why must it be under 1.0?
RTF is processing time divided by audio duration. At 1.0, transcription just keeps pace; below 1.0 the model stays ahead of incoming audio. An RTF at or above 1.0 lets the backlog grow and latency climb without bound, so RTF < 1.0 is required for true streaming.
Should I act on partial or final transcripts?
Render partials for responsiveness, but act only on finals. A partial is the recognizer's current best guess and can change; a final is committed and will not change.
How does the serverless GPU cold start affect STT latency?
A cold start stacks container pull, weight load, and CUDA graph warmup into 30-90 seconds - against a sub-second voice turn, that is a dropped call. Serve live turns from warm pools so the cold-start tax is zero at request time.

Get started with Cerebrium

Deploy AI models on serverless GPUs in minutes, with no infrastructure to manage. Start for free and pay only for the compute you use.

Sign up free

Sources

  1. deepgram.com
    “Streaming speech recognition slices live audio into 100-200 millisecond chunks, allowing the recognizer to process audio without waiting for complete sentences. This micro-buffering keeps end-to-end latency under 300ms.”

    Chunk size and sub-300ms target for streaming transcription.

  2. assemblyai.com
    “Real-time speech recognition is an API technology that converts a live audio stream to text through a persistent WebSocket connection with latency under one second.”

    Definition of real-time STT and the sub-one-second envelope.

  3. elevenlabs.io
    “WebSocket is a long-lived, ordered, reliable, bidirectional channel over TCP. You open a connection, push binary audio frames up, and read transcript events down. It is straightforward on both client and server, it traverses the corporate proxies and firewalls that already allow HTTPS, and every browser and server runtime supports it.”

    Why WebSocket is the default STT transport.

  4. meetstream.ai
    “A good setup delivers meeting audio in the low hundreds of milliseconds, from spoken word to your app.”

    Typical WebSocket transport latency envelope.

  5. soniox.com
    “Smaller frames mean lower latency and more messages. Larger frames mean fewer messages and slightly more lag.”

    Chunk-size latency/overhead tradeoff.

  6. soniox.com
    “Dumping a complete file down the socket at once is not streaming, it is an upload wearing a costume, and chunks that arrive late leave the recognizer idling with nothing to transcribe.”

    Why audio must be streamed at real-time rate.

  7. cartesia.ai
    “A WebSocket runs over TCP, so every byte arrives in order, even if that means waiting. WebRTC usually runs over UDP and is built for media, so it drops or conceals a late packet and keeps playing.”

    TCP head-of-line blocking caveat for WebSocket transport.

  8. soniox.com
    “A partial result is the recognizer's current best guess for what it has heard, and it can still change as more audio arrives. A final result is committed and will not change.”

    Partial vs final transcript definitions.

  9. soniox.com
    “One rule prevents most live-transcription bugs: render partials, but act on finals.”

    Emission rule separating perceived from committed latency.

  10. inworld.ai
    “The realtime model targets around 150ms latency over WebSockets, making it competitive for voice agent use cases.”

    ElevenLabs Scribe v2 Realtime TTFT reference point.

  11. smallest.ai
    “With a Time to First Transcript (TTFT) of just 64 milliseconds, Pulse Speech-to-Text (STT) API is engineered specifically for live, latency-sensitive workloads.”

    Low end of the TTFT range for streaming STT.

  12. dialpad.com
    “RTF is calculated by dividing the time taken by the ASR system to transcribe by the total duration of the spoken audio. If someone speaks for five seconds and it takes five seconds to get the transcript, we have an RTF of one. However, for these systems, we are generally looking for RTF values that are less than one!”

    Real-time factor definition and the sub-1.0 requirement.

  13. arxiv.org
    “The results show that VAD fragmentation provides the best quality with the highest delay, whereas fragmentation at fixed intervals provides the lowest quality and the lowest delay.”

    Quality vs delay tradeoff in audio fragmentation.

  14. cerebrium.ai
    “A serverless GPU cold start is a stack of sequential delays, container pull, model-weight load, and CUDA graph warmup, that can take 30 to 90 seconds.”

    Cold-start definition and total penalty.

  15. cerebrium.ai
    “Production serverless LLM deployments report cold start times exceeding 40 seconds just to produce the first token, while subsequent inference takes only ~30ms per token. This 1000x latency gap between cold and warm states creates an unacceptable user experience for chatbots, voice AI, and any real-time generative application.”

    Cold vs warm latency gap.

  16. cerebrium.ai
    “Weight load from storage \| ~8s \| ~40-45s \| NVMe bandwidth”

    Weight-load phase timings for small vs 70B models.

  17. cerebrium.ai
    “For a voice turn, a multi-second gap is a dropped call.”

    Why cold starts must not hit a live voice turn.

  18. cerebrium.ai
    “Typically, the TTFB (time-to-first-byte) from the Deepgram API is ~250ms whereas the TTFB hosting it locally on Cerebrium is ~110ms which is a 140ms saving.”

    Cerebrium first-hand STT TTFB measurement, self-hosted vs API.

  19. cerebrium.ai
    “Using this pipeline, we are able to achieve an end-to-end latency (First time to audio, in just 600 ms).”

    Full voice pipeline end-to-end latency on Cerebrium.


Related resources

See all
A symmetrical network diagram of small circular nodes connected by straight lines radiating from a central node, forming a hexagonal mesh pattern suggesting a distributed computing cluster.
Anyscale Alternatives for Ray Serve Model Serving
A circular ring enclosing a plus sign, like an add or swap symbol, suggesting an alternative option inside a bounded node.
9 fal.ai Alternatives for Image & Video Inference (2026)
A hexagonal network node containing a question mark, symbolizing the search for alternative inference platforms.
Together AI Alternatives for Fine-Tuned LLM Inference