Synthesize Speech
synthesize_speechConvert 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
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to convert to speech (1-5000 characters per request) | |
| speed | No | Speech speed multiplier (0.5 = half speed, 2.0 = double speed) | |
| voice | No | Voice ID (e.g. 'pf_dora', 'pm_alex', 'af_heart', 'bm_george'). Overrides 'language'. Use list_voices for the full catalog. | |
| language | No | 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. | pt |
| output_format | No | 'audio' (default) returns playable MCP audio content; 'base64_json' returns JSON with the base64-encoded WAV plus metadata | audio |