Media path
OpenAI WebRTC audio
Encrypted microphone input and synthesized agent speech flow as WebRTC media.
Xirsys × OpenAI Realtime
Talk to an OpenAI voice agent with real-time WebRTC audio. Xirsys supplies the STUN and TURN infrastructure that keeps the session reachable across all networks.
Voice session
Sent once over HTTPS to mint an ephemeral Realtime token, then discarded. It is not saved or logged. Use a temporary or restricted project key and revoke it after testing.
One realtime session
The browser connects directly to OpenAI for media and agent events. Xirsys handles the network path, providing a relay only when a direct connection cannot make it through.
Media path
Encrypted microphone input and synthesized agent speech flow as WebRTC media.
Network path
Short-lived STUN/TURN credentials supply host, reflexive, and relay candidates.
Control path
OpenAI JSON events travel over the oai-events WebRTC data channel.
Open source SDK
The complete TypeScript server SDK, browser WebRTC client, demo, tests, and implementation guide are available under the MIT license.
git clone https://github.com/xirsys/openai-realtime-xirsys-webrtc.git
Browse the repository →