Overview
GeminiLiveVertexLLMService enables natural, real-time conversations with Google’s Gemini model through Vertex AI. It provides built-in audio transcription, voice activity detection, and context management for creating interactive AI experiences with multimodal capabilities including audio, video, and text processing.
Gemini Live Vertex API Reference
Pipecat’s API methods for Gemini Live Vertex AI integration
Example Implementation
Complete Gemini Live Vertex AI function calling example
Vertex AI Gemini Documentation
Official Vertex AI Gemini Live API documentation
Gemini Live Model Card
Gemini Live available models
Installation
To use Gemini Live Vertex AI services, install the required dependencies:Prerequisites
Google Cloud Setup
Before using Gemini Live Vertex AI services, you need:- Google Cloud Project: Set up a project in the Google Cloud Console
- Vertex AI API: Enable the Vertex AI API in your project
- Service Account: Create a service account with
roles/aiplatform.userandroles/ml.developerpermissions - Authentication: Set up service account credentials or Application Default Credentials
Required Environment Variables
GOOGLE_VERTEX_TEST_CREDENTIALS: JSON string of service account credentials (optional if using ADC)GOOGLE_CLOUD_PROJECT_ID: Your Google Cloud project IDGOOGLE_CLOUD_LOCATION: Vertex AI region (e.g., “us-east4”)
Key Features
- Enterprise Authentication: Secure service account-based authentication
- Multimodal Processing: Handle audio, video, and text inputs simultaneously
- Real-time Streaming: Low-latency audio and video processing
- Voice Activity Detection: Automatic speech detection and turn management
- Function Calling: Advanced tool integration and API calling capabilities
- Context Management: Intelligent conversation history and system instruction handling
Configuration
GeminiLiveVertexLLMService
This service extendsGeminiLiveLLMService with Vertex AI authentication. It accepts all the same parameters as the Gemini Live service, with these differences:
JSON string of Google service account credentials. If not provided, falls back to
credentials_path or Application Default Credentials (ADC).Path to a service account JSON file. Used if
credentials is not provided.GCP region for the Vertex AI endpoint (e.g.,
"us-east4").Google Cloud project ID.
Vertex AI model identifier to use.
TTS voice identifier for audio responses.
System prompt for the model. Can also be provided via the LLM context.
Tools/functions available to the model. Can also be provided via the LLM context.
Runtime-configurable generation and session settings. See the Gemini Live InputParams for details.
Whether to start with audio input paused.
Whether to start with video input paused.
Whether to generate a response when context is first set. Set to
False to wait for user input before the model responds.HTTP options for the Google API client.
InputParams
The Vertex AI variant uses the sameInputParams as the base Gemini Live service. See Gemini Live InputParams for the full reference.
Usage
Basic Setup with Service Account Credentials
With Credentials File
Using Application Default Credentials (ADC)
With Custom Parameters
Notes
- No
api_keyparameter: Unlike the baseGeminiLiveLLMService, Vertex AI uses service account credentials or ADC for authentication. Passingapi_keywill raise aValueError. - Authentication priority: The service tries credentials in this order: (1)
credentialsJSON string, (2)credentials_pathfile, (3) Application Default Credentials (ADC). - File API not supported: The Gemini File API is not available through Vertex AI. Use Google Cloud Storage for file handling instead.
- Model naming: Vertex AI uses different model identifiers (e.g.,
"google/gemini-live-2.5-flash-native-audio") compared to the Google AI variant. - All other features (VAD, context compression, thinking, function calling, etc.) work identically to the base Gemini Live service.