Text to speech
text_to_speechConverts text into natural-sounding WAV or MP3 speech in English, Spanish, French, Chinese, Japanese, or Korean, returning audio as a base64 data URL for voice replies, narration, and accessibility.
Instructions
Turn text into natural-sounding speech (WAV or MP3 audio) in English, Spanish, French, Chinese, Japanese or Korean. Returns the audio as a base64 data URL. Good for voice replies, narration and accessibility. Costs $0.006 per call.
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 |
|---|---|---|---|
| lang | No | Language: "en" (default), "es", "fr", "zh", "jp", "kr". | |
| text | Yes | What to say (up to 3,000 characters). |