AI tools · Curated for practical, everyday work.Explore tools
All articles
guides

Gemini 3.1 Flash TTS: A Practical Guide

Explore Gemini 3.1 Flash TTS, Google's expressive text-to-speech model: what it can do, how audio tags work, and a reproducible Gemini API starter.

Gemini 3.1 Flash TTS is Google's dedicated text-to-speech model for turning a script into expressive, controllable speech. It supports single-speaker narration and multi-speaker dialogue, and lets you steer delivery with natural-language directions and inline audio tags. This guide explains what is distinctive about Gemini 3.1 Flash TTS, how to try it in Google AI Studio, and how to make a first API request without confusing it with Gemini 3.8 Flash or Gemini Live.

The naming is easy to mix up. Gemini 3.1 Flash TTS is the speech-generation model. Gemini 3.8 Flash is a separate general model that can accept audio as input but returns text; Google's model page says audio generation is not supported. If a project needs generated speech, use the TTS model ID gemini-3.1-flash-tts-preview, not gemini-3.8-flash.Google's TTS guide lists the former as a supported TTS model and shows the exact API configuration.

The Problem: Why Choose a Dedicated TTS Model?

A voice product needs more than a model that reads words aloud. A podcast intro needs energy without sounding like an advert. A learning app may need two distinct speakers, while an audiobook needs stable narration over long passages. If every line is generated with only a voice preset and raw text, the developer has limited control over character, pacing, emphasis, and how a sentence should feel.

Google positions Gemini 3.1 Flash TTS around that directing problem. In its launch announcement, Google describes improvements to speech quality and control, support for more than 70 languages, native multi-speaker dialogue, and inline audio tags. The API documentation adds a practical distinction: TTS is designed to recite supplied text with control over style and sound; the Live API is designed for interactive, unstructured audio experiences. Those are related audio capabilities, but they solve different jobs.

This matters when choosing a workflow. Use TTS when the words are known and the performance needs shaping: narration, voice-over, dialogue, or a generated podcast segment. Use a live audio model when the application must listen and respond as a conversation unfolds. Use a text model such as Gemini 3.8 Flash to draft, summarize, or structure the script, then pass that text to TTS if you need spoken output.

Gemini 3.1 Flash TTS: What It Can Do

The central control is not just a voice dropdown. The TTS prompt can combine a voice, a description of the scene, direction about tone and pace, and a transcript. For example, instead of asking for “a cheerful voice,” describe the use: a relaxed host recording a short morning update, speaking clearly at a measured pace, with warmth but without exaggerated excitement. Then make the actual script match those directions.

Inline audio tags let you adjust delivery at specific points in the text. Tags such as [whispers], [laughs], [excitedly], or [very slowly] can change the emotion or pace of a line; a tag later in the same transcript can change the performance again. Google's guide says there is no exhaustive list of guaranteed tags, so treat them as controls to audition rather than a fixed markup language. It also recommends using English audio tags even when the transcript is in another language.

For dialogue, assign speaker names in the script and map each name to a voice. This lets one request generate a conversation with distinct speakers instead of stitching together unrelated single-speaker clips. The official documentation lists 30 voice options and supports automatic language detection for its published list of languages, including Mandarin Chinese. That is a starting point for prototyping, not a promise that every accent, name, or pronunciation will sound correct on the first try.

Generated audio is marked with SynthID, according to Google's launch post. That invisible watermark is a provenance signal; it does not replace review of the script, pronunciation, rights, or suitability for a particular audience.

How To Try Gemini 3.1 Flash TTS

The quickest evaluation path is Google AI Studio's audio or TTS playground. Paste a short script, choose a voice, and compare a few clearly different directions. Keep the text identical while changing one variable at a time—first the voice, then pace, then an inline tag. This small test makes it easier to hear which instruction caused a change instead of attributing every difference to the model.

For an API request, Google's current guide uses the Interactions API. The following minimal JavaScript example requests audio with the Kore voice and writes the returned PCM bytes into a WAV file. Install the current Google Gen AI JavaScript SDK and the wav package, then set GEMINI_API_KEY in your shell before running it:

import { GoogleGenAI } from "@google/genai";
import wav from "wav";

const client = new GoogleGenAI({});
const result = await client.interactions.create({
  model: "gemini-3.1-flash-tts-preview",
  input: "Say warmly and clearly: Welcome to the field guide.",
  response_format: { type: "audio" },
  generation_config: {
    speech_config: [{ voice: "Kore" }],
  },
});

const audio = Buffer.from(result.output_audio.data, "base64");
const writer = new wav.FileWriter("out.wav", {
  channels: 1,
  sampleRate: 24000,
  bitDepth: 16,
});
writer.write(audio);
writer.end();

This is a starter, not production audio infrastructure: add error handling, request timeouts, and storage appropriate to your app. Google's guide also documents streaming output for TTS models beginning with version 3.1, including this preview model. Streaming is useful when a client should begin processing audio chunks before the full response has arrived; a short, pre-rendered asset is often simpler to cache and serve.

For multiple speakers, the same guide shows a speech_config array with entries such as { speaker: "Maya", voice: "Kore" } and { speaker: "Leo", voice: "Puck" }. The script must label the corresponding lines consistently. Start with a short exchange, listen for speaker assignment and turn boundaries, then expand the dialogue after that behavior is reliable.

A Reproducible Quality Check Before Shipping

Build a small evaluation set rather than judging from one impressive sample. Include a paragraph with numbers and abbreviations, a sentence with a proper name, a question, a line that needs a pause, and a two-speaker exchange. For each test, save the exact script, model ID, voice, directions, and output file name. Re-run the same script after changing one control at a time.

Listen for pronunciation, skipped or repeated words, unwanted pauses, unnatural emphasis, consistency between takes, and whether the emotional direction fits the text. For localized audio, ask a fluent listener to review the result; language detection is not the same as native-sounding pronunciation. For long content, split by meaningful sections and check transitions, then normalize loudness and trim silence in your own audio pipeline if the product requires it.

Keep human review in the loop for names, medical or legal terms, accessibility content, and public-facing brand narration. Voice quality is subjective, and Google's launch benchmark or feature list cannot tell you whether a particular generated performance works for your audience. The short A/B test is the useful evidence: same words, controlled prompt changes, and listeners who represent the real use case.

Verdict: When Gemini 3.1 Flash TTS Fits

Gemini 3.1 Flash TTS is worth evaluating when you need speech from a known script and want more direction than a conventional “choose voice, read text” flow. Its strongest product idea is the combination of speaker-level voice selection and local delivery tags, which can make a single generated passage feel performed rather than uniformly read. The official API guide currently identifies the model as a preview, so check the current availability, limits, and terms before building a dependency around it.

Choose another path when you need real-time turn-taking, guaranteed phoneme-level control, a fixed voice identity not offered by the available presets, or a validated pronunciation pipeline for a regulated domain. And keep the model names straight: Gemini 3.1 Flash TTS generates speech; Gemini 3.8 Flash can help write the script but does not generate audio; Gemini Live serves interactive voice use cases.

If you are comparing tools for the rest of your stack, explore the AI tool directory and monthly AI rankings. For this model, the next step is modest: take a representative 20-second script into AI Studio, compare two voices and two delivery prompts, then decide whether the generated performance meets your bar before wiring up the API.

Related articles