google / gemini-3.1-tts
gemini-3.1-tts
Generate natural speech from text with Gemini 3.1 Flash TTS. Use voice options and expressive tags to control tone and pacing for narration, apps, and accessibility.
Overview
Gemini 3.1 Flash TTS is a text-to-speech model from Google. It uses a large language model to decide both the words and the delivery. You steer performance with plain text direction plus inline square-bracket tags. It outputs spoken audio that’s suitable for voiceovers, narration, and spoken UI.
The model is built for controllable speech. You can change pacing, emotion, and delivery mid-sentence. This helps you ship audio that sounds intentional, not flat.
What you can build
- App voiceovers with a consistent “brand voice”
- Audiobook-style narration with pacing and pause control
- Character dialogue for games (single-voice on this Wiro page)
- Accessibility narration for articles, screens, and UI flows
- Multilingual announcements and help prompts
- Podcast-style scripted segments where exact wording matters
Inputs
- The script you want spoken, provided as plain text. Keep it under roughly 16K tokens of text for the Gemini 3.1 Flash TTS model.
- A style direction written directly into the script, like “Say cheerfully: …” so the model knows how to perform.
- Inline audio tags in square brackets, placed inside the script where you want the change. Examples include tags for laughter, whispering, emotion, and pauses. Google documents 200+ supported tags.
- One prebuilt voice, selected from 30 options: Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat.
Outputs
- A single speech audio result that reads your script in the selected voice.
- The output is delivered as a playable audio file on Wiro.
- The underlying Gemini TTS examples commonly use mono 24,000 Hz, 16-bit PCM audio wrapped in a WAV container.
- Audio generated by Gemini 3.1 Flash TTS is watermarked with SynthID.
Limitations
- This model is in Preview on Google’s side. Behavior and limits can change.
- It’s text-to-speech. It’s meant to read provided text, not invent a new script.
- Multi-speaker dialogue exists in Google’s Gemini TTS offering, but it’s limited to 2 speakers in the Gemini API. This Wiro page exposes a single voice choice.
- If you use Gemini TTS through Google Cloud Text-to-Speech, the “text” and “prompt” fields can each be at most 4,000 bytes, with 8,000 bytes combined. That path can truncate output around 655 seconds.
- Very long scripts can drift in prosody or volume over time. Split long narration into shorter chunks.
- Messy input text can sound bad. Expect problems with OCR errors, missing punctuation, or inconsistent casing.
Safety & compliance
- Gemini 3.1 Flash TTS audio includes SynthID watermarking to help detect AI-generated speech.
- Don’t use it for deception. Don’t impersonate real people, mislead listeners, or hide that audio is synthetic.
- Follow Google’s generative AI policies. Avoid disallowed content such as hate, harassment, sexual content, or instructions for wrongdoing.
Example prompts
Great starting points for gemini-3.1-tts.
API quick start
Run gemini-3.1-tts with a single API call.
{
"prompt": "Synthesize the speech below as a live hor…",
"voice": "fenrir"
}curl -X POST "https://api.wiro.ai/v1/Run/google/gemini-3.1-tts" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_WIRO_API_KEY" \
--data-binary @- <<'JSON'
{
"prompt": "Synthesize the speech below as a live hor…",
"voice": "fenrir"
}
JSONPricing: Final costs are determined after the task is finished. Input: $1.00 per 1M tokens (text). Output: $20.00 per 1M tokens (audio).
View full API docs