Skip to main content
Model logo

Gemini 3.1 Flash TTS API

  • Text to Speech
Output

Your generated audio will appear here

Gemini 3.1 Flash TTS

What is Gemini 3.1 Flash TTS?

Gemini 3.1 Flash TTS is Google's most expressive speech model, and the one Gemini voice that takes stage directions. It reads text in any of 30 prebuilt voices, detects the language on its own, and returns 24kHz audio. On the ArtificialAnalysis Text to Speech leaderboard it holds rank 5 with an Elo of 1212, close behind Luna TTS at 1221 and ahead of StepAudio 2.5 TTS at 1208.

What sets it apart from the 2.5 pair is control. The other two read a script well. This one performs it.

Key features

Inline audio tags. Write [whispering], [excited], [laughing], or [sighs] directly in the text and the model acts on them rather than speaking them. Delivery changes at the tag and holds until the next one, so a single paragraph can move from hushed to urgent without splitting the request.

Two-speaker dialogue. Give each line its own voice and the model renders a conversation in one pass, with the turn-taking and pacing you would expect between two people. Two distinct voices is the ceiling.

30 voices with real character. The roster spans firm and informative (Kore, Charon, Alnilam), bright and upbeat (Zephyr, Puck, Laomedeia), warm and gentle (Sulafat, Vindemiatrix, Achernar), and unusual textures like Algenib's gravel or Enceladus's breathiness.

Style instructions. A separate instruction line steers the whole read, such as "speak like a sports commentator", without becoming part of the spoken text.

70+ languages, auto-detected. Send Japanese and it speaks Japanese. Pin a locale only when the text is ambiguous or you want a specific regional accent.

Best for

Character voice work

Audio tags carry emotional beats that a flat read loses, which is what game dialogue and animation need.

Two-person scripts

Podcast intros, explainer dialogues, and tutorial banter render in a single call instead of two stitched files.

Expressive narration

Story and trailer reads where pacing and emphasis matter more than raw cost per second.

Localized voice content

One script, one model, and automatic language detection across more than 70 languages.

Interactive assistants

Style instructions keep a consistent persona across every response without retuning per request.

Accessibility audio

Natural pacing on long passages makes screen-reader style output easier to follow.

Use cases

Build a podcast pipeline that turns a written outline into a two-host conversation, one voice per host, with the intro whispered and the sponsor read upbeat. Dub an interactive story where each character has a fixed voice and the emotional tags come from the scene state, not from re-recording. Generate localized product tours from a single English script by translating the text and letting the model detect each target language. Give an in-app assistant a persistent personality through a style instruction, so its tone stays the same whether it is confirming an order or apologizing for an outage.

Limitations

Two voices per request is a hard ceiling, so a three-character scene needs to be split and joined afterward. The context window is 32,000 tokens per session, which rules out rendering a whole audiobook in one call. Audio tags are specific to this model, so a script written with them will read them as plain text on 2.5 Pro or 2.5 Flash. Google's content filter also rejects some harmless phrasing, which returns a rephrase message rather than audio.

API examples

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "google/gemini-3.1-flash-tts",
    "input": {
      "text": "[excited] The build passed! [whispering] Do not tell anyone it took nine tries.",
      "voice": "Puck",
      "response_format": "mp3"
    }
  }'

Poll GET /v1/tasks/{task_id} until status is completed, then read output.audio_url. Full parameter reference lives at docs.unifically.com.

FAQs

People also ask

Gemini 3.1 Flash TTS is Google's most expressive text-to-speech model. You send text and pick one of 30 prebuilt voices, and it returns spoken audio at 24kHz. It is the only Gemini voice that performs inline audio tags, and it ranks 5th on the ArtificialAnalysis Text to Speech leaderboard with an Elo of 1212.

Audio tags are bracketed directions written inside the text itself, like [whispering], [excited], [laughing], or [sighs]. The model performs them instead of reading them aloud. Write "[whispering] I have a secret." and that sentence comes out hushed. Tags apply from where they appear until the next one.

Yes, up to two distinct voices in a single request. Send a dialogue array where each line carries its own voice, or write the script with speaker names and pass a speakers map. A third voice is rejected, so longer casts need one request per pair.

30 prebuilt voices, each with its own character, from Kore (firm) and Puck (upbeat) to Sulafat (warm) and Algenib (gravelly). Language is detected automatically across more than 70 languages, and you can pin a specific one with a BCP-47 code like de-DE or ja-JP.

Six. MP3 is the default, plus WAV, raw PCM, Opus, AAC, and FLAC. Google renders 24kHz 16-bit mono, so WAV and PCM carry the model output untouched while the others are encoded from it.

Per second of audio actually delivered, not per character you send. That means a request billed at exactly what it produced, verified from provider usage after each generation, so silence-padded or truncated output never costs you more than the audio you received.

3.1 is the expressive one and the only Gemini voice with audio tags. On the ArtificialAnalysis Text to Speech leaderboard it sits at rank 5 with an Elo of 1212, while Gemini 2.5 Flash TTS sits at rank 37 with 1090. Pick 2.5 Flash when cost per second matters more than performance quality.

A session holds a context window of 32,000 tokens, which covers several thousand words of script in one call. Long-form work like a chapter or a full episode should be split into several requests and joined afterward.