OpenAI Realtime
Stork Live · tested 2026-12-02
Give an OpenAI Realtime voice agent a face over WebRTC.
Before you start
A page that already talks to the Realtime API over WebRTC.
Code
const live = await StorkLive.mount(canvas, { avatar: 'a', siteKey: 'YOUR_SITE_KEY' })
const pc = new RTCPeerConnection()
pc.ontrack = (e) => live.speak(e.streams[0]) // instead of audioEl.srcObject = e.streams[0]Check it works
A face that blinks, with the Powered by stork.ai mark in the corner. When your audio plays, the lips move.
If it does not
- You hear the voice twice. Do not also set audioEl.srcObject to the stream. The avatar plays it.
- No sound until a click. Browsers only start sound after a click or tap. Create the AudioContext in a click handler and set it as live.ctx before the first speak.
- A black box. The browser has no WebGL 2.
Next
Change the letter to change the face: 'a' to 'h' are free. To use a face of your own without the mark, see Your own avatar.
