generate_speech
Convert text to speech using Gemini TTS models. Supports single or two-speaker synthesis with prebuilt voices.
Instructions
Generate speech audio using Gemini TTS models. Supports single-speaker and two-speaker TTS. Input is text-only; audio, image, and video reference files are not accepted. TTS has a 32k-token context limit and does not support streaming. Audio is saved to /root/Music/gemini-generated/speech and returned as MCP audio content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Speech model (default: gemini-3.1-flash-tts-preview, valid on both backends). Vertex AI uses GA ids gemini-2.5-flash-tts/gemini-2.5-pro-tts; Google AI Studio uses gemini-2.5-flash-preview-tts/gemini-2.5-pro-preview-tts. | |
| prompt | Yes | Text or transcript to synthesize as speech. Gemini TTS is text-only input; audio/image/video reference files are not accepted. | |
| speakers | No | Exactly two speaker voice configs for multi-speaker TTS | |
| voiceName | No | Prebuilt voice name for single-speaker TTS (default: Kore) | |
| languageCode | No | Optional BCP-47 language code for speech synthesis |