Build a live translation broadcast app with the Gemini Live API and LiveKit
This guide details building a real-time multilingual broadcast application using Gemini 3.5 Live Translate via the Gemini API, integrated with LiveKit and deployed on Google Cloud Run. The system efficiently manages multiple language streams by ensuring only one active translation session exists per target language, subscribing new listeners to existing sessions rather than creating redundant ones. The architecture leverages WebSockets for persistent connections and utilizes Next.js for deployment.
Key takeaways
-
Efficient Session Management
0:58
The application maintains a maximum of one session per requested target language, subscribing subsequent listeners to the existing LiveGenkit room rather than spinning up new sessions (demonstrated at 0:58).
-
Deployment Architecture
1:59
The solution uses Next.js deployed on Google Cloud Run, which allows for hosting long-running WebSockets and managing the necessary stateful connections (1:39).
-
Scaling Limitations
3:20
The current demo manages translation details in memory, limiting it to a single Cloud Run instance. Scaling beyond this requires externalizing state management using a database (3:20).