Capture + playback
Microphone PCM16 and Realtime JSON events share an ordered WebRTC data channel.
Xirsys × Grok Voice Think Fast 2.0
Stream natural speech to Grok over a browser-to-Node WebRTC link. Xirsys adds fresh STUN and TURN credentials so the session can keep moving through restrictive NATs and firewalls.
Live voice session
Used once to mint a short-lived xAI secret. Never stored, logged, or returned.
Your transcript appears here.
Grok’s reply appears here.
One voice session · three links
Grok’s speech-to-speech API speaks WebSocket, while the browser uses WebRTC for responsive, observable real-time transport. The Node relay bridges those protocols, and Xirsys gives WebRTC a TURN fallback when a NAT or firewall blocks the direct path. That matters because a voice agent that works on home Wi-Fi can otherwise fail on corporate, carrier, and other restrictive networks.
Microphone PCM16 and Realtime JSON events share an ordered WebRTC data channel.
werift terminates WebRTC. Audio stays PCM16, so the bridge does no transcoding.
The pinned voice model handles VAD, reasoning, conversation state, and spoken response.
Build it in three moves
Clone the sample, add server-only credentials, run one command, then inspect the selected ICE path in the live console.
Open the full README ↗Add your xAI, XIRSYS_IDENT, XIRSYS_SECRET, and XIRSYS_CHANNEL in the server environment.
POST /api/bootstrap exchanges the standard xAI key for an ephemeral secret and requests fresh Xirsys ICE servers.
The browser negotiates WebRTC with the Node peer. The relay opens xAI’s Realtime WebSocket pinned to grok-voice-think-fast-2.0.
Clone. Configure. Converse.
Typed provider clients, a secure bootstrap exchange, selected-pair diagnostics, a forced-TURN test, deployment notes, and mocked checks are all included.
git clone https://github.com/xirsys/grok-voice-think-fast-2-xirsys.git
Browse the repository