| Mode | Best for | You choose |
|---|---|---|
| Realtime Models | Fastest path, lowest latency | One provider for speech in and out |
| Custom Pipeline | Full control over each stage | STT, LLM, and TTS independently |
Realtime Mode
Realtime models handle the full voice loop (speech-to-text, reasoning, and text-to-speech) over a single WebRTC or WebSocket connection. No separate STT or TTS plugins needed. The Quickstart usesgemini.Realtime(). To swap providers, change one line in agent.py:
Custom Pipeline Mode
Use a custom pipeline when you want to mix providers. For example, Deepgram for transcription, Gemini for reasoning, and Inworld for voice output. You also get control over turn detection (when the agent starts and stops listening).Copy this prompt into Claude Code, Cursor, Windsurf, or any coding agent to scaffold a custom pipeline.
1. Add plugins
The Quickstart scaffolds with Gemini Realtime. Add STT and TTS plugins on top:.env:
2. Wire up the pipeline
Replacegemini.Realtime() with separate stt, llm, and tts components in agent.py:
3. Mix and match providers
| Component | Options |
|---|---|
| LLM | Gemini, OpenAI, OpenRouter, Anthropic, Grok, HuggingFace |
| STT | Deepgram, ElevenLabs, Fast-Whisper, Fish, Wizper |
| TTS | Inworld, ElevenLabs, Cartesia, Deepgram, Grok, Pocket, AWS Polly |
| Turn Detection | Deepgram (built-in), ElevenLabs (built-in), Smart Turn, Vogent |
Function Calling & MCP
Custom pipelines use an LLM component (gemini.LLM(), not gemini.Realtime()), which supports tool registration:
What’s Next
Phone Integration
Connect agents to inbound and outbound phone calls
RAG Support
Add knowledge bases with Gemini FileSearch or TurboPuffer
Docker Deployment
Docker setup and environment configuration
Built-in HTTP Server
Console mode and HTTP server for running agents
Examples
- Simple Agent: Minimal voice agent with Deepgram STT + Inworld TTS + Gemini LLM
- Twilio Phone Agent: Step-by-step inbound and outbound calls
- Phone & RAG: Add knowledge retrieval to phone agents