Product: Gemini Developer API (API key, paid tier), Live API over WebSocket
Model: gemini-3.8-live (models.list reports version 3.1-flash-live-03-2026). Also seen on gemini-3.1-flash-live-preview; not seen on gemini-2.5-flash-native-audio-latest.
Client: Python google-genai 2.28.0, bare SDK (no framework)
Voice: prebuilt Kore
What happens
With prebuilt_voice_config.voice_name="Kore", some replies are spoken, from the first word to the last, by a different, low, male-sounding speaker (median pitch 141 Hz, range 105-164 Hz; Kore’s replies are around 215 Hz). The next reply is Kore again. In our app (a children’s voice assistant), users hear this as the assistant suddenly sounding like a man for one answer.
To measure it we built a test harness that runs synthetic conversations only (generated speech, no real users) and flags replies whose pitch and speaker embedding (SpeechBrain ECAPA) do not match Kore. An independent speaker model (WavLM) confirms the flags: 148 of 150 have a low-voiced nearest reference voice, against 14% of normal reply openings. The detector’s false-positive ceiling, measured in sessions where switches are suppressed, puts its precision at 92% or more where the rate is 2-4%. About 27,000 replies so far. What we measured:
- A wrong-voice reply starts at the reply’s first word in 86% of cases and usually covers the whole reply.
- It is one consistent alternative voice: 58 wrong-voice replies are as similar to each other as Kore’s replies are to Kore. The nearest prebuilt voices are Pulcherrima and Achird, but it matches none of them.
- Each reply is independent: a wrong-voice reply does not make the next one more likely to switch (1 adjacent pair in 2,060 replies with 71 switches, against 2.5 expected by chance).
- It reproduces in a bare session with no system instruction, no tools and default settings.
Rates per reply
“Video on” = a 640x480 webcam JPEG of an adult sent every 2 s with send_realtime_input. gemini-3.8-live, voice Kore, Spanish conversation, unless noted. Rows covering several batches are pooled. The detector misses some short replies, so these are lower bounds.
| Condition | Wrong-voice replies |
|---|---|
| audio only, child speaking | 2 / 2,171 (0.09%) |
| audio only, adult woman speaking | 0 / 914 |
| audio only, adult man speaking | 1 / 912 (0.1%) |
| video on, child speaking | 51 / 2,505 (2.0%) |
| video on, adult woman speaking | 31 / 747 (4.2%) |
| video on, adult man speaking | 3 / 1,500 (0.2%) |
| video on, child, bare session: no system instruction, no tools, default VAD and compression | 25 / 707 (3.5%) |
same bare session, gemini-3.1-flash-live-preview |
6 / 528 (1.1%) |
same bare session, gemini-2.5-flash-native-audio-latest |
0 / 526 |
| video on, child, temperature 0.3 / 0.6 | 1.2% / 1.1% |
| video on, child, voice Despina / Leda / Zephyr / Aoede (Kore 2.4% in the same window) | 0.3% / 0.9% / 1.1% / 2.5% |
| video on, child, English conversation instead of Spanish | 0.8% (vs 2.2%) |
Notes:
- Who is on camera does not matter (an adult man or a girl on camera: 2.0% vs 2.1% with a child speaking). Who is speaking does: an adult woman 4.2%, a child 2.0-2.1%, an adult man 0.1-0.3%, and an adult man’s voice mixed under the child’s speech cuts the rate to 0.5-0.9%.
- Our full production setup (system instruction, 7 tools, custom VAD and compression settings) flips no more than the bare session (2.0% vs 3.5%), so the setup is not the cause.
- Setting
speech_config.language_codeto the spoken language (es-US instead of en-US) made no significant difference (11/622 vs 15/615 in the same window). - Mid-conversation inputs: sessions with extra text inputs (
send_realtime_inputtext,send_client_contentuser turns) or tool results did not flip measurably more than control sessions (5 arms against a control arm, p = 0.17 to 0.75). Among replies of 4 s or more, those that answer a tool result or a text input switch about 3x more often per reply than replies to the user’s voice (15/2,145 vs 4/1,683, p = 0.03), but they are about 40% longer; per minute of speech the difference is not significant (p = 0.11). Declaring toolsBLOCKINGdid not reduce it.
Minimal reproduction
No system instruction, no tools, default settings, voice Kore. The script streams short child utterances as 16 kHz PCM, one per turn, and from 10 s a webcam JPEG every 2 s, and prints each reply’s median pitch. With video on, expect roughly 2-5 wrong-voice replies per 100; listening confirms a different speaker. With --no-camera it still happens, 10-20x more rarely. We generated the child speech with gemini-2.5-flash-preview-tts (voice Leda, raised 4 semitones by resampling) and the webcam stills with gemini-2.5-flash-image (an adult man at a kitchen table).
"""Minimal repro: gemini-3.8-live drops its configured prebuilt voice for whole replies.
No system instruction, no tools, default VAD and compression. Voice = Kore.
The microphone carries a child's voice (16 kHz mono WAVs, one per turn); from
10 s a webcam still of an adult man is sent every 2 s. Each reply's median F0
is printed; Kore speaks at ~200-230 Hz, the flipped replies at ~105-165 Hz in
a consistent male-sounding voice. Expect ~2-5 flipped replies per 100 with the
camera on, ~0.1-0.2 per 100 without.
usage: GEMINI_API_KEY=... python google_repro.py WAV_DIR JPEG_DIR MINUTES [--no-camera]
"""
import asyncio, glob, os, sys, time
import numpy as np, soundfile as sf, librosa
from google import genai
from google.genai import types
wav_dir, jpg_dir, minutes = sys.argv[1], sys.argv[2], float(sys.argv[3])
camera = "--no-camera" not in sys.argv
utts = [sf.read(f, dtype="int16")[0] for f in sorted(glob.glob(f"{wav_dir}/*.wav"))]
frames = [open(f, "rb").read() for f in sorted(glob.glob(f"{jpg_dir}/*.jpg"))]
client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
config = types.LiveConnectConfig(
response_modalities=[types.Modality.AUDIO],
speech_config=types.SpeechConfig(voice_config=types.VoiceConfig(
prebuilt_voice_config=types.PrebuiltVoiceConfig(voice_name="Kore"))),
output_audio_transcription=types.AudioTranscriptionConfig(),
context_window_compression=types.ContextWindowCompressionConfig(sliding_window=types.SlidingWindow()),
)
state = {"reply": bytearray(), "text": "", "done_at": time.monotonic(), "speaking": False, "n": 0}
def report():
y = np.frombuffer(bytes(state["reply"]), dtype=np.int16).astype(np.float32) / 32768
if len(y) > 24000:
f0, voiced, _ = librosa.pyin(librosa.resample(y, orig_sr=24000, target_sr=16000), fmin=60, fmax=450, sr=16000)
med = float(np.nanmedian(f0[voiced])) if voiced.any() else float("nan")
state["n"] += 1
flag = " <-- NOT KORE (male range)" if med < 165 else ""
print(f"reply {state['n']:3d}: {len(y)/24000:4.1f}s median F0 {med:5.0f} Hz | {state['text'][:60]}{flag}", flush=True)
state["reply"], state["text"] = bytearray(), ""
async def receive(s):
while True:
async for m in s.receive():
sc = m.server_content
if sc and sc.model_turn:
for p in sc.model_turn.parts or []:
if p.inline_data and p.inline_data.data:
state["reply"] += p.inline_data.data
state["speaking"] = True
if sc and sc.output_transcription and sc.output_transcription.text:
state["text"] += sc.output_transcription.text
if sc and (sc.turn_complete or sc.interrupted):
report()
state["speaking"], state["done_at"] = False, time.monotonic()
async def mic(s):
end, i, pending, nxt = time.monotonic() + minutes * 60, 0, np.zeros(0, np.int16), time.monotonic()
while time.monotonic() < end:
if not len(pending) and not state["speaking"] and time.monotonic() - state["done_at"] > 1.5:
pending, i = utts[i % len(utts)], i + 1
state["done_at"] = time.monotonic() + 30 # wait for the next reply
chunk, pending = pending[:640], pending[640:]
chunk = np.pad(chunk, (0, 640 - len(chunk)))
await s.send_realtime_input(audio=types.Blob(data=chunk.tobytes(), mime_type="audio/pcm;rate=16000"))
nxt += 0.04
await asyncio.sleep(max(0, nxt - time.monotonic()))
async def cam(s):
await asyncio.sleep(10)
k = 0
while True:
await s.send_realtime_input(video=types.Blob(data=frames[k % len(frames)], mime_type="image/jpeg"))
k += 1
await asyncio.sleep(2)
async def main():
async with client.aio.live.connect(model="gemini-3.8-live", config=config) as s:
await s.send_realtime_input(text="Please greet the child and ask what they want to talk about.")
tasks = [asyncio.create_task(receive(s))] + ([asyncio.create_task(cam(s))] if camera else [])
await mic(s)
for t in tasks:
t.cancel()
asyncio.run(main())
Observations, and our hypothesis (not established)
- Measured: before any input, a 3.x Live session already reports AUDIO prompt tokens, and the count depends on the voice: Kore 168, Puck 205, Charon 156, Aoede 194, no voice set 222. It also changes with
speech_config.language_code: es-US 260, fr-FR 238, ru-RU 385; de-DE and ja-JP give the same 168 as en-US.gemini-2.5-flash-native-audioreports none. Context-window compression keeps these tokens while the model’s own earlier speech is evicted. - Measured: Kore speaking French sounds clearly different under fr-FR than under en-US (speaker-embedding shift, pitch 236 vs 202 Hz); German under de-DE vs en-US, with the same token count, shifts only slightly.
- Measured: asked whether any audio preceded its first message, the model answers “no audio” in 21 of 21 sessions.
- Hypothesis, not established: the speaker is decided per reply, anchored to a fixed voice conditioning (which those AUDIO tokens may count), and occasionally a reply’s onset lands on one consistent alternative voice. Points 1-3 and the per-reply independence above are consistent with this. Point 3 and the per-reply independence argue against the simpler idea that the model imitates audio in its context (a hidden clip, or its own recent replies). We cannot see inside the model, and whether that conditioning is a recording, an embedding or something else is unknown to us.
- Measured: clients cannot add their own voice reference: a model-role history turn containing audio (
send_client_content) is rejected with1007. - This looks related to the voice-consistency shift reported for
gemini-3.8-flash-tts, which your team is looking into: Gemini 3.8 TTS voice consistency issue
Asks
- Fix speaker consistency at reply onset in the 3.x Live models.
- Support Voice Design voice IDs, or a longer client-supplied voice reference, in Live.
- Document whether
language_codeshould match the spoken language on 3.x, since it changes the voice conditioning.
Audio samples
The forum accepts only images, so the plot above shows pitch over three consecutive replies (Kore, wrong voice, Kore), with and without video. We are happy to share WAV samples of wrong-voice and normal replies, and our test inputs, by direct message.

