GEMINI LABJP
OMNI — Gemini Omni Flash, a natively multimodal model, enters API public preview for building custom video workflowsNANO — Nano Banana 2 Lite arrives as the fastest and most cost-efficient Gemini image model yetFLASH — Gemini 3.5 Flash reaches general availability with sustained frontier performance on agentic and coding tasksAGENTS — Managed Agents enter public preview in the Gemini API, running autonomous, stateful agents in isolated Google-hosted Linux sandboxesMEMORY — The Memory Bank IngestEvents API is GA, decoupling event ingestion from memory generation for continuous streamingTHROUGHPUT — Provisioned throughput now accepts up to seven pending model orders for the same model and regionOMNI — Gemini Omni Flash, a natively multimodal model, enters API public preview for building custom video workflowsNANO — Nano Banana 2 Lite arrives as the fastest and most cost-efficient Gemini image model yetFLASH — Gemini 3.5 Flash reaches general availability with sustained frontier performance on agentic and coding tasksAGENTS — Managed Agents enter public preview in the Gemini API, running autonomous, stateful agents in isolated Google-hosted Linux sandboxesMEMORY — The Memory Bank IngestEvents API is GA, decoupling event ingestion from memory generation for continuous streamingTHROUGHPUT — Provisioned throughput now accepts up to seven pending model orders for the same model and region
Articles/API / SDK
API / SDK/2026-07-11Advanced

Stop Your Captions From Dancing: Splitting Live Translate Into Committed and Volatile Text

Pasting Gemini 3.5 Live Translate interim results straight to the screen makes captions flicker until they are unreadable. Here is a stabilizer that separates a committed prefix from a volatile tail and never rewinds, with working code and measured numbers.

Gemini Live API6Live Translate2captionsrealtimedesign

Premium Article

For a while I obsessed over the latency of voice translation and left the more basic question — is it actually readable? — for later.

I run a few calm, healing-style apps as a solo developer, and I once tried wiring up audio-to-audio conversation translation with the Live API. The audio came back more smoothly than I expected. But the moment I overlaid that same translation as an on-screen caption, the text started rewriting itself in tiny jerks and I could no longer follow it. Before the speaker had even finished a sentence, the trailing word would flip from "light" to "lights," reordering itself. The reader's eyes get yanked all the way back to a sentence opening that should have been settled long ago.

This article is an operations note focused not on the audio, but on how to render the text. Instead of pasting every Live Translate interim result as the latest full string, we split it into a part that has settled and a part that is still moving. That single change made the captions far easier to read.

Why pasting the latest string is unreadable

Live Translate streams the translation back. The tricky part is that what you receive is not a growing, confirmed sentence but a hypothesis that gets rebuilt each time. Every time new audio arrives, the model rewrites the tail — and sometimes re-translates a word or two just before it.

The naive implementation pipes the whole translation into the caption component on every message.

session.on("message", (msg) => {
  const text = msg.translation?.text ?? "";
  setCaption(text); // repaint the entire string every time
});

With this, changing a single trailing character re-lays-out the entire caption. On my setup, interim results arrived roughly 15–25 times per second. That means the caption was being fully recomposed a dozen-plus times a second. The opening words are not going to change anymore, yet every reflow nudges their position slightly, and the eye never settles. That is the "dancing caption" problem.

Separating the committed prefix from the volatile tail

Let's flip the mental model. Instead of treating the translation as one string, we hold two: a committed prefix that never moves backward, and a volatile tail that may still be rewritten.

RegionNatureHow to render
committedOnce settled, never allowed to regressFixed, in the normal style
volatileMay be rewritten as audio arrivesDimmed or underlined to signal "provisional"

The committed region only ever gets appended to. Only the volatile part is rebuilt each frame. Now reflow is confined to a narrow tail, and the reader's eyes rest on a stable opening. Even if the tail corrects "light" into "lights," that fix happens inside the volatile region, so the committed text never shows a wrong word.

The open question is where to draw the line. Commit early and reflow drops, but a later correction forces you to rewind what you committed. Commit late and it is safe, but the caption feels sluggish to settle. There is a trade-off here.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
A working CaptionStabilizer that separates committed prefix from volatile tail, with zero backward rewrites verified on a replay
A trailing-window approach for translating into spaceless languages like Japanese, where word boundaries do not exist
A tuning guide for balancing flicker against latency, derived from measured update rates and hold times
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

API / SDK2026-07-05
Building Conversational Translation Into an App: Speech-to-Speech With the Live API
A design walkthrough for adding speech-to-speech conversational translation to an app with Gemini 3.5 Live Translate and the Live API, covering session lifetime, automatic language switching, latency budgets, and streaming cost, with working code.
API / SDK2026-06-16
Your Gemini Live API session forgets the conversation every time it reconnects — field notes on token refresh and session resumption
Why a Gemini Live API WebSocket drops the conversation and the user's in-flight speech on every reconnect, and how to close the gap with single-use ephemeral tokens, session resumption handles, and the goAway warning.
API / SDK2026-04-04
Building Voice Agents with Gemini Live API: A Basics
Learn how to build real-time voice agents using Gemini Live API. From setup to implementation examples, this guide covers everything you need to get started.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →