text_to_speech
Synthesize text into spoken MP3 audio in supported languages, saving it to a local file path or returning base64 for direct use.
Instructions
Synthesize natural spoken MP3 audio from text (up to 2,000 characters). Saves to output_path when provided, otherwise returns base64 MP3.
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>",
"language": "<language>"
},
"name": "text_to_speech"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to speak (max 2,000 characters). | |
| language | Yes | Language code with TTS support (e.g. "en", "nl", "es"). | |
| output_path | No | Optional local file path to save the MP3 file (e.g. "./speech.mp3"). |