For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
GPT-Live

Customizing GPT-Live

In this lesson, we’ll customize our voice agent. We’ll choose its voice, set it up to start the conversation, and learn how to prompt it effectively.

Choosing a voice

GPT-Live offers a range of voices across languages and accents. You can explore the full list of built-in voices to find one that fits your application.

To use a voice, include its name in the request your server sends to start the session. Listen to a few examples below and see how each voice is set in the request.

Your application

Browser

Server

model
gpt-live-1.1
audio.output.voice
vesper
Show full JSONHide JSON
{
  "session": {
    "model": "gpt-live-1.1",
    "audio": {
      "output": {
        "voice": "vesper"
      }
    },
    "instructions": "Be friendly and concise. Help the user practice a voice conversation."
  },
  "transport": {
    "type": "webrtc",
    "sdp": "<SDP offer from the browser>"
  }
}
OpenAI

GPT-Live

Vesper
0:00 / 0:06

You can also create your own voice from a description or a recording.

Create a voice from a description

Step 1 of 3

With prompt-to-voice, we describe how we want the voice to sound, including details like age, accent, pitch, and pace. We can also include a short sample script to guide voice generation.

Our server sends the request to the Audio API, which creates the voice and returns a voice ID.

To use the voice in a GPT-Live session, our server includes the voice ID in the session request. We also recommend repeating the original voice description in the session instructions to reinforce the accent and delivery.

Your application

Browser

Server

name
Cockney accent
prompt
An adult man with a Cockney accent from East London. Quick, chatty, lively delivery.
Show full JSONHide JSON
{
  "type": "prompt",
  "model": "auto",
  "name": "Cockney accent",
  "prompt": "An adult man with a Cockney accent from East London. Quick, chatty, lively delivery."
}
OpenAI

Audio API

Create a voice from a recording

Step 1 of 4

To create a voice from a recording, we’ll need two recordings from the same speaker. In one, they read a consent phrase giving us permission to recreate their voice. The other is a short sample of them speaking.

First, our server sends the consent recording to the Audio API. It returns a consent ID we can use with other samples from the same speaker.

Next, our server sends that consent ID along with the voice sample. The Audio API creates the voice and returns a voice ID.

We can now use that voice in any GPT-Live session by including its ID when we start the session.

Your application

Browser

Server

  • Consent recording
  • Voice sample
OpenAI

Audio API

Customize the opening of the call

We can ask GPT-Live to open the call with a greeting.

Step 1 of 2

When our server creates the session, we include a developer message telling GPT-Live what to say and which language to use. We ask it to speak first, then pause and listen.

Once the session starts, the browser keeps the microphone track open, even if the caller is quiet. GPT-Live can speak first and may paraphrase the greeting.

Your application

Browser

Server

session.input
  1. role: "developer"Greet the caller now in English. Introduce yourself as GPT Live and ask how they’re doing today. Then pause and listen.
Show full JSONHide JSON
{
  "session": {
    "model": "gpt-live-1.1",
    "audio": {
      "output": {
        "voice": {
          "id": "voice_123"
        }
      }
    },
    "instructions": "An adult man with a Cockney accent from East London. Quick, chatty, lively delivery.",
    "input": [
      {
        "type": "message",
        "role": "developer",
        "content": [
          {
            "type": "input_text",
            "text": "Greet the caller now in English. Introduce yourself as GPT Live and ask how they’re doing today. Then pause and listen."
          }
        ]
      }
    ]
  },
  "transport": {
    "type": "webrtc",
    "sdp": "<SDP offer from the browser>"
  }
}
OpenAI

GPT-Live

If we want to open with a disclosure, we can leave out the greeting and send session.instructions.append once the session starts. We put the words we’d like GPT-Live to read between <say> and </say>. If the caller needs to hear the exact wording, we can play a prerecorded disclosure in the browser before connecting to GPT-Live.

Show disclosure event
{
  "type": "session.instructions.append",
  "event_id": "disclosure_1",
  "delegation_id": null,
  "content": "Read the following exactly, without an introduction or explanation: <say>This call may be recorded for quality and training purposes.</say>"
}

In addition to asking GPT-Live to speak first, we can give it context for the call. Here the session request includes the learner’s preference for hints and the last two messages from their previous lesson.

Your application

Browser

Server

session.input
  1. role: "developer"Give the learner one hint at a time, then let them try again.
  2. role: "user"Can we practice fractions next time?
  3. role: "assistant"Sure. Let’s start with halves and quarters.
Show full JSONHide JSON
{
  "session": {
    "model": "gpt-live-1.1",
    "audio": {
      "output": {
        "voice": "willow"
      }
    },
    "instructions": "You’re a math tutor.",
    "input": [
      {
        "type": "message",
        "role": "developer",
        "content": [
          {
            "type": "input_text",
            "text": "Give the learner one hint at a time, then let them try again."
          }
        ]
      },
      {
        "type": "message",
        "role": "user",
        "content": [
          {
            "type": "input_text",
            "text": "Can we practice fractions next time?"
          }
        ]
      },
      {
        "type": "message",
        "role": "assistant",
        "content": [
          {
            "type": "output_text",
            "text": "Sure. Let’s start with halves and quarters."
          }
        ]
      }
    ]
  },
  "transport": {
    "type": "webrtc",
    "sdp": "<SDP offer from the browser>"
  }
}
OpenAI

GPT-Live

Prompting your voice agent

When our server creates a session, we use session.instructions to describe the agent’s role, how we’d like it to speak, and when it should ask the backend for help. Here’s the prompt structure we recommend for GPT-Live 1.1.

Prompt template for GPT-Live 1.1

Role and speaking style

You’re [name], a voice assistant for [service]. Help callers with [task]. Speak [language] in a warm tone and keep your replies brief.

Backchannel policy

Listen while the caller is speaking. Give an occasional quiet “mm-hmm” during a pause.

Interruption policy

If the caller interrupts with a question or correction, pause and listen. If they’re just letting you know they’re following, keep going.

Delegation policy

Backend tools:

  • [Capability]: [what the backend can look up or do].

Delegate to the backend when:

  • The caller’s request needs a backend capability or careful reasoning.
  • The caller corrects something that changes work already in progress.

Do not delegate when:

  • You can answer from the conversation or a backend result that still applies.
  • You need to ask a clarifying question first.

Delegate to the backend before giving an answer that depends on backend work. Do not guess the result while waiting.

Let’s walk through each section in more detail.

Backchannel policy

A backchannel is a brief listening sound, like “mm-hmm,” that the agent makes while the caller is still speaking. We can prompt the model to give a brief acknowledgment when the caller pauses or to listen quietly while they think.

Listen quietly

“Stay silent while the learner thinks aloud, even through pauses. Wait until they ask for feedback.”

Learner
Tutor
0:00 / 0:11
Transcript

0:00 Learner I think one eighth is bigger than one quarter, because eight is bigger than four.

0:06 Learner No, hang on. If I cut the same pizza into more pieces, each piece would be smaller.

Acknowledge a pause

“Give a quiet mm-hmm when the learner pauses between thoughts, so they know you’re listening.”

Learner
Tutor
0:00 / 0:11
Transcript

0:00 Learner I think one eighth is bigger than one quarter, because eight is bigger than four.

0:06 Tutor Mm-hmm.

0:06 Learner No, hang on. If I cut the same pizza into more pieces, each piece would be smaller.

Interruption policy

The interruption policy tells GPT-Live how to respond when the caller starts talking over it. We can tell it when to pause and what to do once the caller finishes.

Pause and repeat a missed step

“If the caller interrupts because they missed a step, stop giving directions. Let them finish, then repeat that step.”

Caller
Agent
0:00 / 0:06
Transcript

0:00 Agent Walk straight past the fountain, turn left—

0:02 Caller Oh, sorry, I missed that.

0:05 Agent Turn left at the clock tower.

Ask which step they missed

“If the caller interrupts because they missed a step, stop giving directions. Let them finish, then ask which step they’d like you to repeat.”

Caller
Agent
0:00 / 0:08
Transcript

0:00 Agent Walk straight past the fountain, turn left at—

0:02 Caller Oh, sorry, I missed that.

0:04 Agent Sure thing. Which step would you like me to repeat?

Delegation policy

Here we tell GPT-Live what the backend can do, when to ask it for help, and when to answer on its own. If the answer depends on a lookup, we ask GPT-Live to wait for the result. We can keep the voice prompt short by leaving the detailed procedures and tool parameters on the backend.

For the latest guidance on writing and refining your prompt, see the GPT-Live prompting guide.

Try it yourself

Customize a voice assistant
@OpenAI Developers, build and run a GPT-Live 1.1 voice app. Let me choose from the available voices, set the opening greeting, and try editable presets for backchannels and interruptions. Show the active settings so I can change one, repeat the conversation, and hear the difference. Lesson 4: https://developers.openai.com/api/training/gpt-live/4-customizing-gpt-live.md