OpenAI
OpenAI offers versatile multilingual voices balancing low latency and good quality. While voices are optimized for English, they perform well across all supported languages.
Consult OpenAI's Text-to-Speech documentation for more information and audio samples for available voices.
Voice IDs
Copy the voice ID from OpenAI's Voice Options reference.
Prepend openai.
and the string is ready for use.
For example: openai.alloy
Examples
Learn how to use OpenAI voices on the SignalWire platform.
- SWML
- RELAY Realtime SDK
- Call Flow Builder
- cXML
Use the
languages
SWML method to set one or more voices for an AI agent.
version: 1.0.0
sections:
main:
- ai:
prompt:
text: Have an open-ended conversation about flowers.
languages:
- name: English
code: en-US
voice: openai.alloy
Alternatively, use the say_voice
parameter
of the play
SWML method to select a voice for basic TTS.
version: 1.0.0
sections:
main:
- set:
say_voice: "openai.alloy"
- play: "say:Greetings. This is the Alloy voice from OpenAI's text-to-speech model."
// This example uses the Node.js SDK for SignalWire's RELAY Realtime API.
const playback = await call.playTTS({
text: "Greetings. This is the Alloy voice from OpenAI's text-to-speech model.",
voice: "openai.alloy",
});
await playback.ended();
OpenAI voices are not yet supported in Call Flow Builder.
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="openai.alloy">
Greetings. This is the Alloy voice from OpenAI's text-to-speech model.
</Say>
</Response>