synthesize_speech
Convert text to natural-sounding speech. Returns WAV audio (16-bit PCM, 24 kHz mono) synthesized with neural voices. 54 voices across 9 languages -- including 3 native Brazilian Portuguese voices (pf_dora, pm_alex, pm_santa). Usage is metered per character. Args: text: Text to convert to speech (max 5000 characters per request). language: Language code; selects the default voice when no voice is given. voice: Explicit voice ID (see list_voices). Overrides language. speed: Speech speed multiplier, 0.5-2.0. output_format: 'audio' for playable MCP audio content, 'base64_json' for a JSON object with the base64-encoded WAV and metadata. Returns: MCP audio content (audio/wav), or when output_format='base64_json' a dict with keys: - audio_base64 (str): Base64-encoded WAV bytes - mime_type (str): 'audio/wav' - voice (str): Voice used - characters (int): Characters billed - estimated_cost_usd (float): Estimated cost of this request
Parameters5
| text | string | required | Text to convert to speech (1-5000 characters per request) |
| language | string | optional | Language code: 'pt' (Brazilian Portuguese, default), 'en', 'en-gb', 'es', 'fr', 'it', 'hi', 'ja', 'zh'. Used to pick a default voice when 'voice' is omitted. |
| voice | any | optional | Voice ID (e.g. 'pf_dora', 'pm_alex', 'af_heart', 'bm_george'). Overrides 'language'. Use list_voices for the full catalog. |
| speed | number | optional | Speech speed multiplier (0.5 = half speed, 2.0 = double speed) |
| output_format | string | optional | 'audio' (default) returns playable MCP audio content; 'base64_json' returns JSON with the base64-encoded WAV plus metadata |
Raw schema
{
"type": "object",
"properties": {
"text": {
"description": "Text to convert to speech (1-5000 characters per request)",
"maxLength": 5000,
"minLength": 1,
"type": "string"
},
"language": {
"default": "pt",
"description": "Language code: 'pt' (Brazilian Portuguese, default), 'en', 'en-gb', 'es', 'fr', 'it', 'hi', 'ja', 'zh'. Used to pick a default voice when 'voice' is omitted.",
"type": "string"
},
"voice": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Voice ID (e.g. 'pf_dora', 'pm_alex', 'af_heart', 'bm_george'). Overrides 'language'. Use list_voices for the full catalog."
},
"speed": {
"default": 1,
"description": "Speech speed multiplier (0.5 = half speed, 2.0 = double speed)",
"maximum": 2,
"minimum": 0.5,
"type": "number"
},
"output_format": {
"default": "audio",
"description": "'audio' (default) returns playable MCP audio content; 'base64_json' returns JSON with the base64-encoded WAV plus metadata",
"type": "string"
}
},
"required": [
"text"
]
}