# Build a live translation broadcast app with the Gemini Live API and LiveKit

## Executive summary

This technical demonstration outlines the architecture for a real-time, multilingual broadcast application using the Gemini 3.5 Live Translate API. The system leverages LiveKit and Google Cloud Run to manage long-running WebSocket connections, enabling scalable, real-time speech translation and caption broadcasting via WebRTC data channels.

## Key takeaways

- Real-Time Multilingual Broadcast: The application uses Gemini 3.5 Live Translate to set up and manage live translation sessions for multiple languages, subscribing listeners to existing sessions rather than creating new ones for every request.
- Scalable WebSockets with Cloud Run: Deploying Next.js to Google Cloud Run allows the application to maintain long-running WebSocket connections, which is critical for real-time communication.
- WebRTC for Captioning: WebRTC data channels are utilized to broadcast captions alongside the audio stream, enhancing the real-time user experience.

## Technical details

- Gemini 3.5 Live Translate API: The core functionality relies on the Gemini 3.5 model via the Gemini API to handle live, real-time speech translation across multiple languages.
- System Architecture Stack: The application stack includes Next.js for the frontend, LiveKit for real-time communication, and Google Cloud Run for deployment, ensuring long-running WebSocket support.
- Connection Management: The system manages WebSocket connections by subscribing listeners to existing sessions and explicitly closing the WebSocket when the last listener disconnects.

## Practical implications

- Build engineers can apply this architecture pattern for deploying highly scalable, stateful, real-time services (like chat or broadcast tools) using serverless platforms like Cloud Run.
- The integration of WebRTC data channels with modern APIs demonstrates best practices for handling simultaneous audio and metadata streaming.
- This project serves as a model for integrating advanced AI services (Gemini) into robust, production-grade, real-time communication pipelines.

## Topics

Real-Time Communication, Generative AI, WebSockets, WebRTC, Serverless Deployment, Multilingual Processing, Codebase (GitHub), Documentation

Source: https://www.youtube.com/watch?v=Z8ycfJosB-o
