Choose or clone a voice
Every speech request uses one of two voice paths.
Use a voice ID
Pass default or an ID returned by client.voices.list():
speech = client.audio.speech.create(
model="teen-v1",
voice="default",
input="Welcome to the show.",
response_format="mp3",
)Clone from reference audio
from pathlib import Path
speech = client.audio.speech.create(
model="teen-v1",
input="Speak using this reference voice.",
reference_audio=Path("reference.wav"),
reference_audio_format="wav",
response_format="mp3",
)Reference audio may be WAV, MP3, FLAC, or OGG. The SDK accepts bytes, paths, or valid base64 text.
Do not combine a saved voice ID with reference audio. Voice descriptions and reference transcripts are not speech parameters; unsupported fields fail instead of changing the generated audio.
