Writing / Engineering notes

How to Test GPT-Live-1.1 Standby in a WebRTC Voice Agent

Set up a five-second idle timeout, measure how long replies take after standby, and see what one cough did to my test call.

GPT-Live 1.1 Standby beside a blue and gold audio waveform
Read as Markdown

I let my GPT-Live-1.1 voice agent go on standby, then coughed. The call woke up and the assistant asked how it could help. A few seconds later, it went back to standby. When I spoke again, it still remembered the booking code I'd given it earlier.

Standby keeps the WebRTC call connected while OpenAI pauses model inference. You pay a lower voice rate during that pause. I used a small Node.js and browser demo to see how long the first reply took after waking and how easily background noise could bring the call back to the active rate.

Watch my GPT-Live-1.1 standby test on YouTube.

Set up standby in a WebRTC session

Start with a browser that has microphone access and an OpenAI API project with access to GPT-Live-1.1. Have the browser create a WebRTC offer and send its SDP to your Node.js server. Keep OPENAI_API_KEY on that server. The server sends the following body to POST /v1/live/sessions and returns OpenAI's SDP answer to the browser. OpenAI's WebRTC quickstart

js
const body = {
  session: {
    model: 'gpt-live-1.1',
    wake_policy: { type: 'speech' },
    idle_timeout_s: 5,
    client: {
      data_channel: {
        allowed_client_events: ['session.close'],
        allowed_server_events: [
          { type: 'session.paused' },
          { type: 'session.resumed' },
          { type: 'session.closed' },
        ],
      },
    },
  },
  transport: { type: 'webrtc', sdp: offerSdp },
}

wake_policy: { type: 'speech' } tells the session to wait for speech before starting inference. idle_timeout_s: 5 puts it back on standby after five seconds without an input or output transcript. The API accepts whole seconds from 5 to 60. Keep the microphone track active so the server can hear the next utterance. OpenAI's standby configuration guide

Run the wake-up test

  1. Start a call and give the assistant a fictional booking code. While the call is active, ask a short follow-up and time the gap between the end of your speech and the start of its reply.
  2. Wait for session.paused, speak again, and watch for session.resumed. Time the reply the same way. The browser demo used audio levels to estimate both endpoints. Headphones help keep the assistant's audio out of the microphone.
  3. Wait for another session.paused, then try a cough or a sound people might make while using your app. Check whether it triggers session.resumed and whether the assistant answers.
  4. Ask the assistant to repeat the booking code from the start of the call. When you're finished, send session.close and wait for session.closed to get the final usage.

In my browser test, replies started about 1.4 seconds after I stopped speaking while the call was active. After standby they took 2.2–2.3 seconds. One cough triggered a wake and an unsolicited reply. The assistant also read back the booking code correctly within the same session. The timings come from one browser test. Run the same sequence with your microphone and the kinds of pauses your users take.

Work out what standby saves

OpenAI bills the voice session by the second at $0.05 per active minute and $0.02 per standby minute. In a ten-minute call, eight active minutes and two standby minutes cost $0.44, down from $0.50 if the session stays active throughout. That's a 12% saving on voice time. Backend model and tool usage are billed separately. OpenAI's voice cost guide

Count only the time the session actually spends on standby. The five seconds before the idle timeout still use the active rate, and a false wake starts the active clock again. I'd try standby on calls where people regularly stop to look up a booking number or read instructions. For short pauses in a noisy room, I'd compare a longer timeout with leaving standby off. Listen to the first reply after each wake and check the final active and standby seconds before choosing a setting.