Text To Audio
text_to_audioConvert text into speech audio with TTS models. Choose preset voices, clone a reference speaker, or design a voice from a description for narration and accessibility.
Instructions
Convert text to speech audio using TTS models.
Generates natural-sounding speech from text with customizable voice and parameters.
Supports three modes, and each model implements exactly one — passing the
wrong one is rejected with a 422. Leave mode unset and it is taken from
the model's own card:
custom_voice: pick a preset
voice(e.g. Kokoro, Chatterbox)voice_clone: reproduce the speaker in
ref_audio(+ optionalref_text)voice_design: build a voice from an
instructdescription
lang and voice values are per-model and listed under each model in the
"Available models" section below (Kokoro: lang 'en-us', voice 'af_alloy';
Qwen3: lang 'English'). Leave them unset to use the model's own defaults.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>",
"model": "<model>"
},
"name": "text_to_audio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | Language code as the model expects it (Kokoro: 'en-us'; Qwen3: 'English'). Defaults to the model's own | |
| mode | No | TTS mode: 'custom_voice', 'voice_clone' or 'voice_design'. Leave unset to use the mode the model supports | |
| text | Yes | Text to convert to speech | |
| model | Yes | TTS model name (e.g., 'Kokoro') | |
| speed | No | Speech speed. Per model (see 'speed' in the model list; most fix it at 1). Defaults to the model's own | |
| voice | No | Voice name from the model list for the chosen lang (e.g. Kokoro en-us 'af_alloy'). Defaults to the model's default voice for that language | |
| instruct | No | Voice description for voice_design models (required there), or style/emotion control in custom_voice mode, e.g. 'speak slowly and warmly' | |
| ref_text | No | Transcript of ref_audio, improves cloning accuracy | |
| ref_audio | No | Reference audio sample to clone (data URI, base64 or URL). Requires mode='voice_clone' | |
| sample_rate | No | Sample rate in Hz. Defaults to the model's own | |
| webhook_url | No | HTTPS URL for deAPI to call when this job finishes. Notifies your own systems; the tool still returns the result here | |
| audio_format | No | Output format. Defaults to the model's own; most models emit mp3 only | |
| webhook_secret | No | 32-255 char key deAPI signs the callback with (HMAC-SHA256). Needs webhook_url. A secret given in chat stays in the transcript |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||