Synthesize speech
synthesizeConvert text to speech in a specified voice, returning audio as base64 with duration and token count. Supports format selection, speed adjustment, and continuation for lengthy texts.
Instructions
Turn text into speech in a named voice. Returns the audio as base64 plus the audio duration and token count. format is "wav" by default; "flac" is the same samples, losslessly, at about a quarter the size: worth asking for when the reply is saved to a file rather than played. "mp3" and "opus" are lossy and smaller still, for a reply sent on to a chat or a phone. Same text, voice and seed give the same audio, and the same bytes in every format but ogg and opus, whose container carries a random stream serial. Omit language to read the text in the voice's own language; pass one only to read text in a language the voice was not enrolled in. speed is playback speed in [0.5, 2.0] with the pitch preserved: 1.0, the default, is an exact bypass. To read a long text as several calls without an audible restart at each join, pass the previous reply's continuation list back as previous_tokens. Check truncated: when true the utterance hit the token cap and the speech is cut off mid-sentence. A refusal comes back as error with error_kind "bad_request": something about this call to fix, and supported or available listing what would have worked, and code from the same frozen catalog the HTTP and gRPC doors name the condition with.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| text | Yes | ||
| speed | No | ||
| voice | Yes | ||
| format | No | wav | |
| language | No | ||
| previous_tokens | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||