
Voice modelling happens inside the speech request and does not save a reusable voice.
| Outcome | Fields |
|---|---|
| Describe a request-time voice | voice_description |
| Clone speaker identity | reference_audio, reference_audio_format |
| Control a cloned voice | Reference fields plus voice_description |
| Use an exact reference transcript | Reference fields plus reference_transcript |
The SDK leaves voice unset in description-only and inline reference requests. The API selects its default voice, so no voice ID is required.
voice_description or reference_transcript, never both. voice_description also works by itself. The SDK raises VoiceDescriptionConflictError; the API returns voice_description_reference_transcript_conflict.Python
speech = client.audio.speech.create(
model="teen-v1",
input="Welcome to the show.",
voice_description="Young, warm, confident narrator",
response_format="mp3",
)Describe age, tone, emotion, pace, or delivery in ordinary language. Do not put the description inside input.
Python
from pathlib import Path
speech = client.audio.speech.create(
model="teen-v1",
input="Use the supplied speaker identity.",
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.
Python
speech = client.audio.speech.create(
model="teen-v1",
input="Keep the speaker but change the delivery.",
reference_audio="reference.wav",
reference_audio_format="wav",
voice_description="Slightly faster with a cheerful tone",
response_format="mp3",
)The recording supplies identity; voice_description controls style while preserving that identity.
Python
speech = client.audio.speech.create(
model="teen-v1",
input="Continue with every vocal detail preserved.",
reference_audio="reference.wav",
reference_audio_format="wav",
reference_transcript="Exact words spoken in reference.wav.",
response_format="mp3",
)The transcript must match the supplied recording exactly. The legacy parameter name reference_text remains accepted, but new code should use reference_transcript.
On this page