Artificial Intelligence

OpenAI teaches WebRTC as the pipe for GPT-Live

OpenAI's new GPT-Live lesson recommends WebRTC over WebSockets for real-time voice, and teaches the SDP handshake, sideband connections and SIP.

StartupHub.ai Staff

By StartupHub.ai Staff, reviewed by Daniel Singer, Editor

3 min read

Until now, a text app talked to a model in complete messages. The user typed, hit send, waited for the answer. OpenAI's new developer lesson on GPT-Live throws that out: voice applications must stream audio in both directions at once, while the person is still speaking and while the model is still talking.

That requirement drives every engineering choice in the lesson. The connection has to stay open for the whole conversation, because GPT-Live keeps listening while it speaks. OpenAI walks through two transports. WebSockets can carry audio but were not built for it, so the application would handle buffering itself, smoothing out response chunks that arrive at uneven intervals so they play as continuous speech. WebRTC was built for live audio and video and does that work for you: compression, smooth playback, uneven arrivals.

Build your first voice application with GPT-Live
Build your first voice application with GPT-Live

So OpenAI recommends WebRTC for GPT-Live audio across browser, mobile and server applications, and uses it throughout the course. That is not an isolated position. LocalAI's Realtime API documentation says the WebRTC transport enables browser-based voice conversations with lower latency, and Google's Gemini Live API documentation shows its partner platforms integrating over WebRTC as well. The browser vendors and the model providers have converged on the same pipe.

The lesson then gets specific about the handshake. The browser asks for microphone permission, then generates an SDP offer, a Session Description Protocol text blob covering compression format and network details. The offer routes through the application server, where the OpenAI API key lives. The server creates a session with OpenAI, passing the offer plus settings like the model name and assistant instructions. OpenAI returns an SDP answer, the browser finishes the connection, and audio starts flowing through two WebRTC audio tracks, one each way, plus a data channel for transcripts, session updates and commands such as ending the conversation.

Two gaps remain, and OpenAI names both. GPT-Live automatically summarizes long conversations, and details can drop out, so the company tells developers to save critical information in their own application and feed it back when needed. And the architecture taught here keeps the server out of the audio path entirely.

That changes later in the course. OpenAI introduces the sideband, a second WebSocket connection that gives the server direct access to the same GPT-Live session, so it can receive transcripts and delegation requests while the browser keeps handling the microphone and the model's voice. Phone agents get their own path: SIP, the standard for setting up internet phone calls, connects through a phone provider.

The next lesson covers customizing the voice and prompting best practices. What is still missing is pricing, latency figures, and any word on when the sideband approach stops being optional and becomes necessary for production agents.

Mentioned in this story

Markets

Sources

TopicsOpenAIGPT-LiveWebRTCWebSocketSDPSIPRealtime APIGemini Live API

StartupHub.ai StaffDaniel SingerWritten by StartupHub.ai Staff, Editorial teamReviewed by Daniel Singer, EditorAbout

StartupHub.ai Staff, Editorial team

The staff writers of StartupHub.ai, ranging from investment analysts to avid AI tool users, early adopters and critical enthusiasts. Backgrounds span engineering, business and the arts. We hold every piece to rigorous standards of research and review.

Daniel Singer, Editor

Daniel Singer is an AI expert who has been writing about, covering and building AI technology since 2018.

More from Daniel Singer

Get the free daily brief every morning

Every morning the day's AI news, new AI startups and new funding rounds. Free and takes a few minutes to read, unsubscribe at any time.

Join 64,000 other subscribers.

Test your Agent Readiness now

Paste your website. How well ChatGPT, Claude and the other agents can read and use a site, in about a minute.

The videos behind the news, one flip at a time

The feed mixes the videos from our articles with startup demos and you flip through them like TV channels for free with no signup.