# High latency (5-8 seconds) with Google Gemini Realtime plugin over SIP

**URL:** <https://community.livekit.io/t/high-latency-5-8-seconds-with-google-gemini-realtime-plugin-over-sip/238>\
**Category:** Self Hosting\
**Tags:** gemini, sip-trunking, turn-detection\
**Created:** [January 21, 2026, 3:52pm UTC](https://community.livekit.io/t/high-latency-5-8-seconds-with-google-gemini-realtime-plugin-over-sip/238 "2026-01-21T15:52:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LiveKit-Community](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/livekit-community/32/67_2.png) [@LiveKit-Community](https://community.livekit.io/u/LiveKit-Community)\
**Post date:** [January 21, 2026, 3:52pm UTC](https://community.livekit.io/t/high-latency-5-8-seconds-with-google-gemini-realtime-plugin-over-sip/238/1 "2026-01-21T15:52:16Z")

</div>

_This question originally came up in our Slack community and the thread has been consolidated here for long-term reference._

I’m working on a voice assistant using LiveKit SIP (with Twilio) and the Google Gemini Realtime plugin. Calls connect successfully and conversation flows, but I’m facing 5-8 second latency for agent replies.

I’ve tested both self-hosted (Docker Compose) and LiveKit Cloud - latency is the same on both.

**My stack:**

- Model: `gemini-2.5-flash-native-audio-preview` via `google.realtime`
- SIP: Twilio Elastic SIP Trunk

**Optimizations tried:**

- Added `silero.VAD` for faster speech-end detection
- Added `turn_detector.EnglishModel()` for turn-taking
- Reduced `min_silence_duration` to 0.4

Has anyone else experienced this delay with the Gemini Realtime plugin?

---

<div class="post-metadata">

**Author:** ![LiveKit-Community](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/livekit-community/32/67_2.png) [@LiveKit-Community](https://community.livekit.io/u/LiveKit-Community)\
**Post date:** [January 21, 2026, 3:52pm UTC](https://community.livekit.io/t/high-latency-5-8-seconds-with-google-gemini-realtime-plugin-over-sip/238/2 "2026-01-21T15:52:18Z")

</div>

Others have experienced latency with Gemini Realtime as well. Some observations:

**Timeout errors:** Check your logs - the Gemini realtime plugin can run into timeout errors frequently, which contributes to lag. If you’re on the free tier Gemini API, this is more common.

**Tool calls:** If you’re using tool calls, they might be slowing things down.

**Alternative models:** For comparison, GPT-4o and GPT-4o-mini can achieve sub-1000ms latency. While Gemini is good, it’s currently not as reliable or consistent as OpenAI’s models in terms of latency and response quality.

**VAD tuning:** Your approach of reducing `min_silence_duration` is correct. You might also experiment with other VAD parameters.

---

<div class="post-metadata">

**Author:** ![krishna.kanjani](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@krishna.kanjani](https://community.livekit.io/u/krishna.kanjani)\
**Post date:** [March 9, 2026, 9:31am UTC](https://community.livekit.io/t/high-latency-5-8-seconds-with-google-gemini-realtime-plugin-over-sip/238/3 "2026-03-09T09:31:30Z")

</div>

Hello, I am facing the same issue for a long time now. Can you please suggest what other parameters can be used to fix this? Or is this an expected behavior??

**My stack:**

- Model: `gemini-2.5-flash-native-audio-preview-12-2025` via `google.realtime`

- SIP: Twilio Elastic SIP Trunk and Plivo SIP Trunk

**Optimizations tried:**

- Added `silero.VAD` for faster speech-end detection with `min_speech_duration=0.1`, `min_silence_duration=0.25`, `activation_threshold=0.5`, `deactivation_threshold=0.40`, `prefix_padding_duration=0.0`

---

<div class="post-metadata">

**Author:** ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)\
**Post date:** [April 8, 2026, 12:59pm UTC](https://community.livekit.io/t/high-latency-5-8-seconds-with-google-gemini-realtime-plugin-over-sip/238/4 "2026-04-08T12:59:42Z")

</div>

This question has a lot of views, so I will improve the update the answer.

The best general resource for understanding and improving agent latency is this blog:

> **[Understand and Improve Agent Latency](https://livekit.com/blog/understand-and-improve-agent-latency)**
>
> Details the potential sources of latency in your voice AI solution, and which you should address as a priority

To address some of the specifics in the question:

- The original question, under ‘optimizations tried’, implies the OP is using LiveKit’s turn detection. Gemini, like other Realtime models, has its own built-in turn detection which should be used unless there is a good reason you need a separate turn detection model: [Gemini Live API plugin | LiveKit Documentation](https://docs.livekit.io/agents/models/realtime/plugins/gemini/#turn-detection)
- I have seen reports that the [provider tools](https://docs.livekit.io/agents/models/realtime/plugins/gemini/#provider-tools) in Gemini Live can add latency, so it is worth testing without those.
