Skip to content
View original post on X: Philipp Schmid
Published
Pick

Gemini 3.8 Flash TTS adds custom voice creation from recordings or a sentence

AIGemini 3.8 Flash TTS and Flash-Lite TTS are now available in the Gemini API and AI Studio, with a new option to replicate a user's own voice from two recordings or design one from a sentence. The guide says the reusable voice ID can be passed in later requests, or an encrypted voicekey that expires after 7 days can be used if nothing is stored server-side.

AIWhy it matters.

The guide shows how to replicate or design a voice from a sentence, and lists prompting changes that will break existing Gemini TTS workflows.

@_philschmid
View on X

https://x.com/i/article/2103140786292269056

Create your own voice for Gemini 3.8 TTS

Orginally: https://www.philschmid.de/gemini-3-8-tts

Gemini 3.8 Flash TTS and Flash-Lite TTS are now available, in the Gemini API and AI Studio. Ranking #1 on Hume's Voice Design Benchmark, and on top of Voice Arena in 6 languages.

Biggest new features is that you can now replicate your own voice or create a new one from a sentence. The guide below shows how to do both.

Read below or share this prompt with your agent.

1. Record 2 clips

Same mic, same room, 24kHz mono. The API compares the two recordings, so don't switch from a headset to the laptop mic between them.

Linux: -f alsa -i default. On macOS, the first run may only open the microphone permission dialog. Allow it, then run the command again.

The consent sentence must be one of the 25 supported versions, read exactly. German, for example: "Ich bin der Eigentümer dieser Stimme und bin damit einverstanden, dass Google diese Stimme zur Erstellung eines synthetischen Stimmmodells verwendet." The reference clip can be in any language. Use the language you want the voice to speak later.

2. Create the voice, then speak

Two things to notice. The text is spoken word for word. The delivery ("casual, a bit amused") goes in speech_metadata.style, and the short sounds go inline as <short pause> and <laugh>. The voice ID is reusable: pass it in any later request, or find it again with client.voices.list(type_=["replicated"]).

If you don't want anything stored server-side, store=False returns an encrypted voicekey_... that you keep yourself. It works in the same speech_config field and expires after 7 days.

Or design one from a sentence

No recordings needed. Same call, different voice dict. You also get a sample_audio preview, so you can listen to the voice before you synthesize anything:

What changed in prompting

If you're coming from gemini-3.1-flash-tts-preview, this will break your prompts, so read the prompting guide and the migration notes. The short version:

- Input text is spoken word for word. Instructions written inside the text get spoken out loud too.

- Delivery that lasts the whole line ("whispering", "out of breath") goes in speech_metadata.style. Short sounds go inline in angle brackets.

- Multi-speaker turns need an explicit speaker on every turn.

- Long "Audio Profile" prompts now cause voice drift. Design the persona once with the Voices API, then send short or empty style strings.

- Non-streaming (unary) responses are real WAV (audio/wav), so remove any code that adds a WAV header. Set response_format to audio/l16 if you still want raw PCM.

Source details

Philipp Schmid · x.comPublished · added here

Original title: Create your own voice for Gemini 3.8 TTS