Google Gemini Live
Google’s Gemini Live API runs a low-latency, native-audio dialog agent. The bridge proxies Teler call audio into Gemini and relays the model’s spoken response back.
Reference repos
Section titled “Reference repos”Prerequisites
Section titled “Prerequisites”- A Google Cloud project with Gemini API access and a
GOOGLE_API_KEY - A Teler account with an active API key
- One Teler phone number on your account
- An ngrok auth token (for local development)
- Docker and Docker Compose
Configuration
Section titled “Configuration”| Variable | Required | Default | Description |
|---|---|---|---|
GOOGLE_API_KEY | yes | none | Your Google API key with Gemini access. |
GEMINI_MODEL | no | gemini-2.5-flash-preview-native-audio-dialog | Model identifier. |
GEMINI_SYSTEM_MESSAGE | no | none | System prompt that defines the agent’s persona and behavior. |
GEMINI_AUDIO_CHUNK_COUNT | no | 5 | How many chunks to buffer before forwarding to Gemini. |
TELER_API_KEY | yes | none | Your Teler API key. |
NGROK_AUTHTOKEN | yes (local) | none | ngrok auth token. |
SERVER_DOMAIN | auto | none | Public URL exposed to Teler. Detected from ngrok. |
5-minute setup
Section titled “5-minute setup”git clone https://github.com/frejun-tech/teler-gemini-bridgecd teler-gemini-bridgecp .env.example .envdocker compose up -d --buildgit clone https://github.com/frejun-tech/teler-gemini-node-bridgecd teler-gemini-node-bridgecp .env.example .envdocker compose up -d --buildInitiate a call
Section titled “Initiate a call”curl -X POST http://localhost:8000/api/v1/calls/initiate-call \ -H "Content-Type: application/json" \ -d '{ "from_number": "+91XXXXXXXXXX", "to_number": "+91XXXXXXXXXX" }'Audio quirks
Section titled “Audio quirks”Gemini Live emits 24 kHz PCM. The bridge resamples to 8 kHz for Teler
using scipy. If you need higher fidelity, configure your Stream flow with
sample_rate: "16k" and adjust the bridge’s downsampling code.
Tuning latency
Section titled “Tuning latency”GEMINI_AUDIO_CHUNK_COUNT controls input buffering. Lower = lower latency
but more network overhead and higher token consumption. Higher = smoother
turns but laggier feel. The default of 5 is a reasonable starting point.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
| Agent silent | Model name typo or unreleased | Check GEMINI_MODEL against current Google docs |
| API quota errors | Free-tier limits hit | Check usage in Google Cloud Console |
| Long latency to first token | Cold start | Send a warm-up message before connecting calls |
| Wrong language / persona | Empty GEMINI_SYSTEM_MESSAGE | Set the system prompt explicitly |
Next steps
Section titled “Next steps” Other recipes OpenAI Realtime, ElevenLabs, Vapi, and more.
Bridge architecture The conceptual model behind every recipe.