Render a [PAUSE n] script to one MP3
render_scriptConverts a markdown script into one continuous MP3, inserting exact silent pauses and synthesizing sentence segments, then returns the file path, duration details, and audio.
Instructions
Renders a markdown script into a single continuous MP3. Lines consisting only of "[PAUSE n]" become n seconds of real silence; text is split at sentence boundaries and synthesised segment by segment, then joined on MP3 frame level without re-encoding. Returns the file path, the measured total duration and the duration of every segment, plus the MP3 as an audio block (up to 8 MB, unless TELNYX_TTS_EMBED_AUDIO=false).
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": {
"script": "<script>",
"voice": "<voice>"
},
"name": "render_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rate | No | Speaking rate multiplier (1 = normal). Mapped per provider: voice_speed for Telnyx Ultra/Grok, speed for Minimax/Soniox, SSML <prosody rate> for AWS Polly and Azure. Other providers reject it. | |
| voice | Yes | Voice id in Provider.Model.VoiceId format, e.g. "Telnyx.Ultra.Clara" or "aws.Polly.Vicki". | |
| script | Yes | Markdown script. Lines that consist only of "[PAUSE n]" become n seconds of real silence; headings, horizontal rules and note lines mentioning the markers are not spoken. | |
| language | No | BCP-47 language code, e.g. "de-DE". Used by AWS Polly, Azure, ElevenLabs, Inworld and Soniox; ignored by other providers. | |
| file_name | No | Base name for the MP3. | |
| max_chars | No | Maximum characters per synthesis request (default 1800). | |
| voice_settings | No | ||
| lead_in_seconds | No | Silence before the first segment. | |
| lead_out_seconds | No | Silence after the last segment. |