Generate speech
generate_speechTurn text into natural WAV speech or a two-speaker dialogue, using voice and style controls for podcasts, voiceovers, narration, and conversations.
Instructions
Turn text into natural speech (WAV) with one voice, or a dialogue between two speakers. Control delivery with style. About $0.01-0.02 per minute of audio. For podcasts, voiceovers, narration and dialogue.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | The exact words to speak (single speaker). Newer models read it verbatim, so put delivery directions in style, not here. Inline tags like <sigh> or <short pause> are allowed. | |
| model | No | Model ID or alias: tts (default, Gemini 3.8 Flash TTS), tts-lite (cheaper). See list_models. | |
| style | No | How to deliver the lines, e.g. 'warm and enthusiastic', 'whispered urgently', 'slow, calm narrator'. | |
| voice | No | Voice for single-speaker text, e.g. Kore (firm), Puck (upbeat), Charon (informative), Aoede (breezy, default), Zephyr (bright). list_models shows all 30. | |
| format | No | wav (default) or pcm (raw 16-bit little-endian). | |
| dialogue | No | Alternative to text: a conversation between up to 2 named speakers, one entry per line. | |
| speakers | No | Voice per dialogue speaker; unlisted speakers get distinct defaults. | |
| outputName | No | Optional base file name. | |
| languageCode | No | Optional BCP-47 code (e.g. en-US, it-IT). Usually auto-detected from the text. | |
| approvedCostUsd | No | Only needed above the confirmation threshold. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | Yes | ||
| file | Yes | ||
| model | Yes | ||
| voices | Yes | ||
| warnings | No | ||
| durationSeconds | No |