Xirsys × OpenAI Realtime

Use OpenAI Voice Agents on Xirsys

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.

WebRTC Live audio
STUN/TURN NAT traversal
Data channel Agent events

Voice session

Ready to connect

idle
ICE not connected WebSocket off
Required · BYOK

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.

Connection events
WebRTC route
Not connected
Selected path
No candidate pair selected
Xirsys TURN
Not in use
Xirsys WebSocket
Disabled

One realtime session

Each transport has one clear job.

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.

01

Media path

OpenAI WebRTC audio

Encrypted microphone input and synthesized agent speech flow as WebRTC media.

02

Network path

Xirsys NAT traversal

Short-lived STUN/TURN credentials supply host, reflexive, and relay candidates.

03

Control path

Realtime data channel

OpenAI JSON events travel over the oai-events WebRTC data channel.

Open source SDK

Clone it. Configure it. Ship voice.

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 →