Text To Audio
text_to_audioConvert 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.
Available models:
Qwen3_TTS_12Hz_1_7B_VoiceDesign: text=10-5000 chars, speed=1 (fixed), sample_rate: 24000, mode=voice_design, format=mp3 langs: English, Italian, Spanish, Portuguese, Russian, French, German, Korean, Japanese, Chinese (voice from instruct)Qwen3_TTS_12Hz_1_7B_Base: text=10-5000 chars, speed=1 (fixed), sample_rate: 24000, mode=voice_clone, format=mp3 langs: English, Italian, Spanish, Portuguese, Russian, French, German, Korean, Japanese, Chinese (voice from ref_audio, 5-15s)Qwen3_TTS_12Hz_1_7B_CustomVoice: text=10-5000 chars, speed=1 (fixed), sample_rate: 24000, mode=custom_voice, format=mp3 langs: Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, Italian (10); voices (9, shared): Vivian, Serena, Uncle_Fu, Dylan, Eric, Ryan, Aiden, Ono_Anna, Sohee (Chinese lacks Ryan)Chatterbox: text=10-2000 chars, speed=1 (fixed), sample_rate: 24000, mode=custom_voice, format=mp3 langs: ar, da, de, el, en, es, fi, fr, he, hi, it, ja, ko, ms, nl, no, pl, pt, ru, sv, sw, tr, zh (23); voices (1, same in every language): defaultKokoro: text=3-10001 chars, speed=0.5-2, sample_rate: 24000, mode=custom_voice, format=mp3 langs: en-us [20: af_alloy, af_aoede, af_bella, af_heart, af_jessica, af_kore, af_nicole, af_nova, af_river, af_sarah, af_sky, am_adam, am_echo, am_eric, am_fenrir, am_liam, am_michael, am_onyx, am_puck, am_santa]; en-gb [8: bf_alice, bf_emma, bf_isabella, bf_lily, bm_daniel, bm_fable, bm_george, bm_lewis]; es [3: ef_dora, em_alex, em_santa]; fr-fr [1: ff_siwis]; hi [4: hf_alpha, hf_beta, hm_omega, hm_psi]; it [2: if_sara, im_nicola]; pt-br [3: pf_dora, pm_alex, pm_santa]
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 | |||