Create speech
Start with the required fields and an output format.
speech = client.audio.speech.create(
model="teen-v1",
input="Create a Teen V1 response.",
response_format="mp3",
)
speech.write_to_file("speech.mp3")Required fields
| Field | Value |
|---|---|
model | teen-v1 |
input | 1–4096 characters |
voice is optional and defaults to default. Supply a public or saved voice_... ID only when selecting that voice.
Output fields
| Field | Default | Accepted values |
|---|---|---|
response_format | pcm | pcm, mp3, wav |
output_sample_rate | Server default | 8000–48000 Hz |
stream | True | True or False; WAV requires False |
stream_format | audio | audio or sse |
Generation fields
| Field | Default | Purpose |
|---|---|---|
quality | fast | Use expressive for the expressive generation profile |
transliterate | False | Convert Romanized Hindi words to Devanagari |
cfg_value | 2.0 | Guidance strength from 1.0 to 3.0 |
max_generate_length | 2000 | Model generation budget from 32 to 4096 |
lora | None | Select a registered server-side LoRA |
Enable transliteration for Hinglish. Leave it off when the text contains English words whose spelling and pronunciation should stay intact.
speech = client.audio.speech.create(
model="teen-v1",
input="kal main office jaunga",
transliterate=True,
response_format="mp3",
stream=False,
)
speech.write_to_file("speech.mp3")Choose a voice ID or reference-audio clone for each request.
