> ## Documentation Index
> Fetch the complete documentation index at: https://visionagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini STT

[Google's Gemini](https://ai.google.dev/gemini-api/docs/live) provides streaming speech-to-text through its Live transcription models, with automatic language detection and built-in turn detection.

<Info>
  Vision Agents uses [Stream Video](https://getstream.io/video/) for real-time WebRTC transport by default. [External WebRTC transports](/integrations/introduction-to-integrations#edge-transport) are supported as well. Most AI providers offer free tiers to get started.
</Info>

<Tip>
  Gemini also provides an [LLM](/integrations/llm/gemini) with built-in tools and [Realtime speech-to-speech](/integrations/realtime/gemini). You can use the STT and LLM in the same agent.
</Tip>

## Installation

```sh theme={null}
uv add "vision-agents[gemini]"
```

## Quick Start

```python theme={null}
from vision_agents.core import Agent, User
from vision_agents.plugins import elevenlabs, gemini, getstream

agent = Agent(
    edge=getstream.Edge(),
    agent_user=User(name="Assistant", id="agent"),
    instructions="You are a helpful assistant.",
    llm=gemini.LLM(),
    stt=gemini.STT(),
    tts=elevenlabs.TTS(),
)
```

<Warning>
  Set `GOOGLE_API_KEY` or `GEMINI_API_KEY` in your environment, or pass `api_key` directly.
</Warning>

## Parameters

```python theme={null}
stt = gemini.STT(
    language_codes=["en-US"],
    custom_vocabulary=["Vision Agents", "GetStream"],
)
```

| Name                | Type           | Default                        | Description                                                        |
| ------------------- | -------------- | ------------------------------ | ------------------------------------------------------------------ |
| `model`             | `str`          | `"gemini-3.5-transcribe-live"` | Gemini Live transcription model                                    |
| `language_codes`    | `list[str]`    | `None`                         | BCP-47 language codes. Omit for automatic language detection       |
| `custom_vocabulary` | `list[str]`    | `None`                         | Phrases that should be recognized accurately                       |
| `http_options`      | `HttpOptions`  | `None`                         | Gemini HTTP configuration                                          |
| `client`            | `genai.Client` | `None`                         | Preconfigured Gemini client                                        |
| `api_key`           | `str`          | `None`                         | API key (defaults to `GOOGLE_API_KEY` or `GEMINI_API_KEY` env var) |

## Language Detection

Gemini detects the spoken language automatically. Pass `language_codes` when you know which
languages to expect, which helps in multilingual calls:

```python theme={null}
stt = gemini.STT(language_codes=["en-US", "de-DE"])
```

## Custom Vocabulary

Product names, jargon, and proper nouns are often transcribed incorrectly. Pass them as
`custom_vocabulary` to bias recognition towards the spelling you want:

```python theme={null}
stt = gemini.STT(
    custom_vocabulary=["Vision Agents", "GetStream", "Mintlify"],
)
```

## Transcripts and Turns

The plugin streams 16 kHz PCM audio to Gemini and emits standard transcript events as speech
arrives, followed by a final transcript when the utterance completes. Turn detection is built in,
so no separate [turn detection](/ai-technologies/turn-detection) plugin is required.

<Info>
  Google also publishes `gemini-3.5-transcribe` for file transcription. This plugin uses the Live
  model for real-time streaming.
</Info>

## Next Steps

<CardGroup cols={2}>
  <Card title="Gemini LLM" icon="brain" href="/integrations/llm/gemini">
    LLM with built-in tools and RAG
  </Card>

  <Card title="Build a Voice Agent" icon="microphone" href="/introduction/voice-agents">
    Get started with voice
  </Card>
</CardGroup>
