Cloudflare-native voice infrastructure

The voice stack, in one continuous session.

Listen, transcribe, reason, and speak without stitching four public APIs together. One realtime contract carries the entire turn.

WebSocket control · PCM and WebRTC media · up to 60-minute sessions
Session ready

edge-session-01

WebSocketVisual prototype
01
VAD Speech boundary
--
02
STT Live transcript
--
03
LLM Turn decision
--
04
TTS Audio response
--
Press start to preview a realtime turn
Transcript EN
You

Waiting for speech...

Assistant

I found three decisions: ship the beta, keep realtime transcription, and review latency on Friday.

TransportWebSocket
InputPCM16 · 16 kHz
Turn latency--
InterruptionReady
TransportFull duplex
Session ownerDurable Object
Speech boundaryLocal VAD
Public shapeOpenAI Realtime
One living turn

Every stage begins before the last one feels finished.

The session keeps audio and meaning in motion. Boundaries stay explicit, while the user experiences one conversation.

01VAD

Hear the turn

TEN-VAD runs beside the session, finding speech boundaries without another network hop.

02STT

Stream the meaning

Realtime transcription starts on speech and emits immutable transcript deltas.

03LLM

Decide the response

Turn policy chooses whether to wait, acknowledge, answer, or interrupt.

04TTS

Speak while thinking

Provider-neutral audio decoding streams raw response audio back into the session.

Built as a system

State lives close to the conversation.

A Durable Object owns each session. Local WASM handles signal processing. Provider Workers remain composable and private behind service bindings.

Hibernation preserves the socket while the object sleeps.
Session topologyPrivate service composition
ClientWebSocket / WebRTC
control + media
RealtimeVoiceSessionDurable Object
RNNoiseSpeexDSPTEN-VAD
STTLLMTTS
Realtime event stream
 input_audio_buffer.append
 input_audio_buffer.speech_started
 conversation.item.input_audio_transcription.delta
 response.output_audio.delta
 response.done
Familiar outside. Composable inside.

A public protocol your client already understands.

The gateway exposes an OpenAI-compatible Realtime WebSocket while specialized Workers own transcription, reasoning, and speech generation.

Configure an agent
Technical foundation

Less orchestration in your client. More control at the edge.

Session state

One Durable Object

One bounded object owns conversation order, quota state, audio flow, interruption, and transparent hibernation.

Local signal path

DSP at the edge

RNNoise, SpeexDSP, and TEN-VAD run with the Worker. Audio is prepared before it reaches transcription.

Private composition

Bindings, not public hops

STT, LLM, image analysis, and TTS stay behind explicit Cloudflare service bindings.

Public contract

OpenAI-compatible events

Use a familiar Realtime WebSocket shape while keeping model routing and provider credentials private.

Voice should feel like a conversation,
not a chain of requests.

Build your first agent