generate_speech
Generate clear speech audio from text with customizable voice, pitch, and speaking style. Supports multiple languages and automatic model fallback.
Instructions
Generate speech audio from text using Gemini TTS.
Rotates across all configured API keys and falls back between models. Gemini TTS voices are multilingual — any voice speaks the language of the input text automatically.
Args: text: The text content to vocalize. voice_name: Gemini voice (use list_voices to browse). Default: Puck. style_instruction: Optional speaking-style hint prepended to text, e.g. "speak softly", "cheerfully", "in a calm tone". pitch_factor: Pitch adjustment. 1.0 = no change, >1 = higher, <1 = lower. model: Model override. Default: gemini-3.1-flash-tts-preview, falls back to gemini-2.5-flash-preview-tts. output_path: Optional custom output path for the WAV file.
Returns: Absolute path to the generated WAV file, or error description.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| model | No | ||
| voice_name | No | Puck | |
| output_path | No | ||
| pitch_factor | No | ||
| style_instruction | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |