calm-book-72252
08/28/2025, 8:53 PMtall-airline-16756
08/28/2025, 8:53 PMtall-airline-16756
08/28/2025, 8:54 PMcalm-book-72252
08/28/2025, 8:55 PMtall-airline-16756
08/28/2025, 8:55 PMfrom livekit.plugins import google
# Create an AgentSession with Gemini's real-time model
session = AgentSession(
llm=google.beta.realtime.RealtimeModel(
model="gemini-2.0-flash-exp", # Specify the Gemini model
voice="Puck", # Choose a voice
instructions="You are a helpful assistant", # Set assistant instructions
),
)
# Gemini's built-in VAD is enabled by default, so no extra setup is needed.
# The session will automatically take care of turn detection using Gemini's VAD.
This setup uses Gemini's built-in VAD, which is the default and recommended way to keep things simple and cost-effective. If you want, I’m here to help with a sample for a different setup using MultilingualModel and STT—just let me know!calm-book-72252
08/28/2025, 8:55 PMtall-airline-16756
08/28/2025, 8:56 PMthreshold, prefix_padding_ms, or silence_duration_ms through the LiveKit API. It comes with a default setup that’s turned on automatically, and the only thing you can do right now is turn it off if you want to use a different turn detection system—like LiveKit’s MultilingualModel with an STT plugin.
If you’re looking for more detailed VAD customization, you might want to check out the Gemini Live API directly, outside of LiveKit’s integration. I’m here to help if you want some pointers on setting up another turn detection system or if you have a specific customization in mind. Just let me know!
Sources: Gemini Live API integration guide | LiveKit Docs | Azure OpenAI Realtime API and LiveKit | LiveKit Docs | Adjusting Model Parameters | LiveKit Docscalm-book-72252
08/28/2025, 8:58 PMtall-airline-16756
08/28/2025, 8:59 PMrealtimeInputConfig.automaticActivityDetection.sensitivity) isn’t officially confirmed as something you can tweak for Gemini's VAD in the LiveKit API. You can totally turn off automatic activity detection if you want, but there isn’t any documented way to fine-tune sensitivity or other settings like threshold or silence_duration_ms for Gemini’s built-in VAD.
If you’re hoping to catch quieter speech or cut down on false triggers, one idea is to try a client-side VAD or bring in a separate STT plugin that lets you customize turn detection. I’m happy to help you set that up or chat more about what you’re aiming for with sensitivity tweaks—just let me know!
Sources: livekit-plugins/livekit-plugins-silero/livekit/plugins/silero/vad.py | VoicePipelineAgent | LiveKit Docs | Voice activity detection (VAD) parameters | LiveKit Docs | OpenAI Realtime API integration guide | LiveKit Docs | Azure OpenAI Realtime API and LiveKit | LiveKit Docs