AI / Google Antigravity Gemini Fundamentals Interview Questions
What is the Gemini Live API and what real-time capabilities does it enable?
The Gemini Live API enables low-latency, bidirectional real-time interactions with Gemini models over a WebSocket connection. It supports simultaneous audio streaming in both directions, enabling voice conversations, real-time transcription, and audio-to-audio (A2A) applications.
| Capability | Model | Notes |
|---|---|---|
| Voice conversation | gemini-3.1-flash-live-preview | Real-time A2A; natural dialogue |
| Text-to-speech streaming | gemini-3.1-flash-tts-preview | Stream audio as it generates |
| Real-time video understanding | Supported models | Analyse live webcam/screen |
| Interruption handling | Built-in | User can interrupt mid-response |
| Tool use in real time | Supported | Agent can call tools during conversation |
import asyncio from google import genai client = genai.Client() async def realtime_session(): # Live API uses async context manager async with client.aio.live.connect( model="gemini-3.1-flash-live-preview", config={ "response_modalities": ["AUDIO"], # get audio back "speech_config": { "voice_config": {"prebuilt_voice_config": {"voice_name": "Aoede"}} }, "system_instruction": "You are a helpful coding assistant." } ) as session: # Send audio input await session.send(input=audio_chunk, end_of_turn=True) # Receive streaming audio response async for response in session.receive(): if response.data: # audio bytes play_audio(response.data) asyncio.run(realtime_session())
The Live API differs from standard generation in that it maintains a persistent WebSocket connection, enabling sub-second turn latency - crucial for natural voice interaction. The gemini-3.1-flash-live-preview model is specifically designed for real-time dialogue and voice-first AI applications.
More Related questions...