Metadata-Version: 2.5
Name: livekit-plugins-google
Version: 2.0.0b2
Summary: Agent Framework plugin for services from Google Cloud
Project-URL: Documentation, https://docs.livekit.io
Project-URL: Website, https://livekit.io/
Project-URL: Source, https://github.com/livekit/agents
Author: LiveKit
License-Expression: Apache-2.0
Keywords: ai,audio,gemini,google,livekit,realtime,video,voice
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Multimedia :: Sound/Audio
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: google-auth<3,>=2
Requires-Dist: google-cloud-speech<3,>=2.36
Requires-Dist: google-cloud-texttospeech<3,>=2.32
Requires-Dist: google-genai>=2.13; python_version >= '3.10'
Requires-Dist: httpx2<3,>=2.12
Requires-Dist: livekit-agents>=2.0.0b2
Requires-Dist: openai<4,>=3.19
Description-Content-Type: text/markdown

# Google AI plugin for LiveKit Agents

Support for Gemini, Gemini Live, Cloud Speech-to-Text, and Cloud Text-to-Speech.

See [https://docs.livekit.io/agents/integrations/google/](https://docs.livekit.io/agents/integrations/google/) for more information.

## Installation

```bash
pip install livekit-plugins-google
```

## Pre-requisites

For credentials, you'll need a Google Cloud account and obtain the correct credentials. Credentials can be passed directly or via Application Default Credentials as specified in [How Application Default Credentials works](https://cloud.google.com/docs/authentication/application-default-credentials).

To use the STT and TTS API, you'll need to enable the respective services for your Google Cloud project.

- Cloud Speech-to-Text API
- Cloud Text-to-Speech API

## Speech-to-Text and Text-to-Speech

The plugin has two speech products, each with its own class:

- `google.STT` and `google.TTS`: Cloud Speech-to-Text (V2 API) and Cloud Text-to-Speech, over gRPC
  with Google Cloud credentials.
- `google.GeminiSTT` and `google.GeminiTTS`: transcription over a Gemini Live session, and speech
  generation through the Gemini API, with a Gemini API key or Vertex AI. `GeminiTTS` supports
  multi-speaker voices and per-sentence delivery styles.

`google.STT` speaks the Speech-to-Text V2 API only. `model` takes a V2 model (`long`, the
default, `short`, `telephony`, `telephony_short`, `medical_dictation`, `medical_conversation`,
`chirp`, `chirp_2`, `chirp_3`, `chirp_telephony`); V1-only names such as `latest_long` are not
accepted. Recognition needs a Google Cloud project, from `project`, the credentials, or
Application Default Credentials.

`google.GeminiTTS` defaults to `gemini-3.8-flash-tts`; `gemini-3.8-flash-lite-tts` is the faster,
cheaper option.

## Live API model support

LiveKit supports the Gemini Live API through both the Gemini Developer API and Vertex AI. Model availability and behavior differ between APIs. Some models, such as `gemini-3.8-live`, are available on both.

For model/API pairs that appear incompatible, the plugin logs a warning and lets the API decide whether the model is available.

The following models are supported by Gemini Developer API:

- gemini-3.8-live
- gemini-3.8-live-extended-thinking
- gemini-3.1-flash-live-preview
- gemini-2.5-flash-native-audio-preview-09-2025
- gemini-2.5-flash-native-audio-preview-12-2025

On the Gemini Developer API, `gemini-3.8-live` does not support `thinking_config.thinking_level`. Use `gemini-3.8-live-extended-thinking` for configurable thinking.

And these on Vertex AI:

- gemini-3.8-live
- gemini-live-2.5-flash-native-audio

References:

- [Gemini API Models](https://ai.google.dev/gemini-api/docs/models)
- [Gemini Live API thinking](https://ai.google.dev/gemini-api/docs/live-api/thinking)
- [Vertex Live API](https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api)
