Gemini 3.8 Flash TTS

Gemini 3.8 Flash TTS is Google's text-to-speech model for expressive, natural-sounding speech from text. It follows natural-language delivery directions for tone, pace, and emotion, renders inline tags such as laughs, sighs, and pauses, and generates two-speaker dialogue in a single request. It detects the language of the text automatically across more than 130 languages, making it suitable for narration, voice agents, podcasts, audiobooks, and localized voiceover.

Complete technical specification for integration
Ready-to-use code snippets for common workflows
Step-by-step tutorials for advanced use cases
← All GuidesDialogue
How to generate a two-speaker conversation with Gemini 3.8 Flash TTS in one request: pairing voices, writing the turns, adding backchannels and sharing one style.
Introduction
Gemini 3.8 Flash TTS generates a conversation between two speakers in one request. speech.voices pairs each speaker's alias with a voice, the text opens every turn with that alias in square brackets, and the model returns the whole exchange as one audio file.
[Maya] So we shipped the redesign on Tuesday. [Leo] And by Wednesday morning, the support inbox had doubled. [Maya] <laugh> Okay, in fairness, half of those emails said they loved it. [Leo] And the other half couldn't find the logout button.
This guide covers the request, writing the turns, choosing two voices, backchannels, one style for both speakers and scenes with more than two.
The request
speech.voices takes exactly two entries, each with a speaker alias and a voice. It replaces speech.voice, and a request that sends both is rejected.
import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'google:gemini@3.8-flash-tts',
speech: {
text: '[Maya] So we shipped the redesign on Tuesday. [Leo] And by Wednesday morning, the support inbox had doubled. [Maya] <laugh> Okay, in fairness, half of those emails said they loved it. [Leo] And the other half couldn\'t find the logout button.',
voices: [
{
speaker: 'Maya',
voice: 'Pulcherrima'
},
{
speaker: 'Leo',
voice: 'Algieba'
}
]
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "google:gemini@3.8-flash-tts",
"speech": {
"text": "[Maya] So we shipped the redesign on Tuesday. [Leo] And by Wednesday morning, the support inbox had doubled. [Maya] <laugh> Okay, in fairness, half of those emails said they loved it. [Leo] And the other half couldn't find the logout button.",
"voices": [
{
"speaker": "Maya",
"voice": "Pulcherrima"
},
{
"speaker": "Leo",
"voice": "Algieba"
}
]
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "audioInference",
"taskUUID": "0302318c-6a71-474b-87b3-14c58cc34c8b",
"model": "google:gemini@3.8-flash-tts",
"speech": {
"text": "[Maya] So we shipped the redesign on Tuesday. [Leo] And by Wednesday morning, the support inbox had doubled. [Maya] <laugh> Okay, in fairness, half of those emails said they loved it. [Leo] And the other half couldn't find the logout button.",
"voices": [
{
"speaker": "Maya",
"voice": "Pulcherrima"
},
{
"speaker": "Leo",
"voice": "Algieba"
}
]
}
}
]'runware run google:gemini@3.8-flash-tts \
speech.text="[Maya] So we shipped the redesign on Tuesday. [Leo] And by Wednesday morning, the support inbox had doubled. [Maya] <laugh> Okay, in fairness, half of those emails said they loved it. [Leo] And the other half couldn't find the logout button." \
speech.voices.0.speaker=Maya \
speech.voices.0.voice=Pulcherrima \
speech.voices.1.speaker=Leo \
speech.voices.1.voice=Algieba{
"taskType": "audioInference",
"taskUUID": "0302318c-6a71-474b-87b3-14c58cc34c8b",
"model": "google:gemini@3.8-flash-tts",
"speech": {
"text": "[Maya] So we shipped the redesign on Tuesday. [Leo] And by Wednesday morning, the support inbox had doubled. [Maya] <laugh> Okay, in fairness, half of those emails said they loved it. [Leo] And the other half couldn't find the logout button.",
"voices": [
{
"speaker": "Maya",
"voice": "Pulcherrima"
},
{
"speaker": "Leo",
"voice": "Algieba"
}
]
}
}Response
[
{
"taskType": "audioInference",
"taskUUID": "0302318c-6a71-474b-87b3-14c58cc34c8b",
"audioUUID": "c4649585-0f33-4280-8b71-4dd0c30d1516",
"audioURL": "https://am.runware.ai/audio/os/a14d18/ws/2/ai/c4649585-0f33-4280-8b71-4dd0c30d1516.mp3"
}
]Writing the turns
Start every turn with its alias in square brackets, spelled as in speech.voices. The alias only marks who speaks, so it can be a name such as [Maya] or a role such as [Host].
Each turn is a transcript of that speaker's line, written the way Prompting describes. A sound goes inside the turn of the speaker who makes it, as with Maya's <laugh> above. A label such as "Maya:" written into the text is part of the transcript, so the bracketed alias is the only marker a turn needs.
Choosing two voices
Listeners follow a conversation by ear, so pick two voices that differ in character as well as name. A female and a male voice are the easy contrast. Two voices of the same gender work when their characters are far apart, such as Firm and Youthful in the customer interview below.
[Host] Dana, you opened your second store last spring. What changed? [Dana] Honestly? We stopped guessing. We looked at what people came back for, and we built the whole shop around it. [Host] And the first month? [Dana] <laugh> Busier than our entire first year.
Choosing a voice groups all 30 voices by character.
Backchannels
In a real conversation the listener reacts while the other person talks. Write that reaction between pipes inside the speaker's turn, such as |mm-hm|, and the other speaker voices it without taking the turn.
[Sam] So the trick is to set the yearly price first |mm-hm| and then work out the monthly one from there. [Ana] Wait, the yearly one first? [Sam] Yearly first. |huh| Because that's the number people compare |right| even when they pay monthly.
One style for both speakers
settings.style applies to every turn of both speakers, so give it a direction they share, such as the format of the piece. The voices and the words carry the difference between them.
[Jen] Have you tried the new menu at Hilltop? [Marc] The wood-fired pizzas? [Jen] Every Thursday, two for one. [Marc] Okay. I know where we're going this week. [Jen] Hilltop. On Main Street, open till midnight.
Delivery style covers writing the direction.
More than two speakers
A request holds two speakers at most. For a third voice, split the scene into requests with two speakers each, or generate the third speaker's lines on their own with speech.voice, then join the files in order.
Tips
-
Open every turn with an alias. The bracketed alias is how the model knows which voice reads the line.
-
Pair contrasting voices. A different gender or a distant character keeps the two speakers apart by ear.
-
Use pipes for reactions under a line. A reaction that takes the floor gets its own turn, and one that sits under the other speaker goes between pipes.
-
Give both speakers one shared direction. The style covers every turn, so describe the format rather than one speaker.