Text to speech
text_to_speechGenerate spoken audio from text in Tunisian Derja, French, English, or mixed language with selectable voices and inline nonverbal effect tags.
Instructions
Speak text in Tunisian Derja (Arabic script or Arabizi), French, English, or a mix with one of the Tapra voices, with Tunisian pronunciation. Voices: amal = Mature woman. Warm, grounded, everyday Tunisian.; salma = Younger woman. Lighter and brighter, conversational.; salah = Man with a big, sharp (aigu) voice that carries. Strong presence.; fahmi = Middle-aged man. Normal, natural male voice.; leo = Young man. Light and energetic. The default Tapra voice.. Add non-verbal effects inline with tags (not billed): [euh] breathy hesitation; [aaa] long filler while thinking; [hmm] closed-mouth "mmm"; [ahem] clears the throat; [ouf] tired sigh; [breath] out-breath, "haah"; [stutter] repeats the first sound of the next word; put it right before that word. Example: "[euh] ma na3rafch, [breath] khalli nchouf". Saves the audio in the chosen format (wav by default, 18 other formats). Voice cloning and custom voice design are not currently available: if the user asks to clone a voice, say so and offer these voices. Costs money per character. For long scripts or narration timed to a video, use create_voiceover.
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>"
},
"name": "text_to_speech"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | What to say. May include effect tags like [euh], [hmm], [breath]. | |
| speed | No | Speaking rate, 0.7-1.3. Default 1.0. | |
| voice | No | Tapra voice: amal = Mature woman. Warm, grounded, everyday Tunisian.; salma = Younger woman. Lighter and brighter, conversational.; salah = Man with a big, sharp (aigu) voice that carries. Strong presence.; fahmi = Middle-aged man. Normal, natural male voice.; leo = Young man. Light and energetic. The default Tapra voice.. Voice cloning is not available. | leo |
| format | No | Audio format: wav (default, lossless), mp3_<rate>_<kbps>, pcm_<rate> (16-bit WAV), ulaw_8000 / alaw_8000 (telephony), opus_48000_<kbps> (Ogg Opus). mp3, opus, ulaw and alaw need ffmpeg. | wav |
| quality | No | "full" = best quality; "flash" = same voices, about 5x faster and cheaper. | full |
| output_path | No | Where to save. Relative paths go in the output folder; the extension follows the format. | |
| max_cost_tnd | No | Refuse to run if the estimated cost is above this many TND. Defaults to TAPRA_MAX_COST_TND when set. | |
| convert_arabizi | No | Convert Arabizi (e.g. "3aslema") to Arabic script before speaking, as Voice Studio does. | |
| duration_seconds | No | Force the clip to last this long. |