This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, manish. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'd love to help you get to the bottom of this! Could you share a bit more about your setup? For example: • Are you working with the Gemini API or Vertex AI? • Do you have features like affective dialog, proactivity, or thinking turned on? • Have you noticed any particular delays, like in server processing or audio streaming? Also, if you happen to have any logs showing latency measurements (like timestamps for response generation), sharing those would be super helpful for us to understand what's going on. Sources: plugins/google/src/beta/realtime/api_proto.ts | realtime/gemini_live_vision.py | web/src/data/models.ts | Gemini Live API plugin | LiveKit docs | Real-time AI Models & Streaming | livekit/livekit_composite | DeepWiki
h
Copy code
llm=google.beta.realtime.RealtimeModel(
        model= "gemini-2.5-flash-live-preview",#"gemini-2.5-flash-native-audio-preview-09-2025", #"gemini-2.0-flash-live-001"
        voice="leda", #"kore", #"aoede", #"zephyr", #'Puck',
        language="te-IN",
        temperature=0.8,
        instructions="""  
                        You are a Telugu-only voice assistant."""
t
It looks like there might be a little hiccup with the model identifier. The model name "gemini-2.5-flash-live-preview" isn’t one we have explicitly documented. Usually, the commonly supported models are "gemini-2.0-flash-live-001" and "gemini-2.5-flash-native-audio-preview-09-2025." Could you please double-check the model name you’re using? Also, the voice "Leda" and the Telugu language ("te-IN") are supported, though performance can vary depending on the language. To help with the latency you’re experiencing, here are a few things you might try: • Make sure your deployment region is close to Google's API endpoints to help reduce network latency. • Keep an eye on metrics like time-to-first-token (TTFT) and duration emitted by the RealtimeModel to spot where delays might be happening. • Check the official Google Gemini documentation to confirm Telugu language support and performance details. If you’d like, I’m here to help you dive deeper into specific latency metrics or tweak your configuration to get things running more smoothly. Just let me know! Sources: livekit-plugins/livekit-plugins-google/livekit/plugins/google/realtime/real... | Real-time AI Models & Streaming | livekit/livekit_composite | DeepWiki | realtime/gemini_live_vision.py | plugins/google/src/beta/realtime/realtime_api.ts | How can I reduce latency in voice agents using STT, TTS and LLM?
h
go ahead
t
Thanks so much for reaching out! To better understand the latency you're experiencing, could you please share a bit more detail? For example: • Are you noticing delays during the server processing phase (like the time-to-first-token) or is it more during the audio streaming? • Do you happen to have any logs with timestamps that show when the response is generated? • Have you had a chance to try a different model identifier, such as "gemini-2.0-flash-live-001" or "gemini-2.5-flash-native-audio-preview-09-2025"? With this info, we'll be in a great spot to figure out what's going on and find the best solution for you. Looking forward to your response!
h
I have tried out all Gemini models available, in every model I have observed latency in responses of the agent.
t
Thanks for sharing that you’ve noticed latency across all Gemini models. Let’s work together to figure out what might be causing this and how we can improve the performance: • Keep an eye on important metrics like Time to First Token (TTFT), Time to First Byte (TTFB), and Tokens per Second. These can help pinpoint if delays are happening during server processing, network transfer, or audio streaming. • Make sure your deployment region is as close as possible to Google's API endpoints—this can really help reduce network latency. • If you’re working with real-time applications, consider using optimized models like gemini-2.0-flash-live-001 or gemini-2.5-flash-native-audio-preview-09-2025, which are designed for low latency. • Try tweaking model parameters such as temperature (lower values often speed up responses) and candidate count (setting it to 1 can help improve speed). • For audio, using 16kHz mono PCM input and reducing resampling steps can make a positive difference. If you’re comfortable sharing specific metrics like TTFT or TTFB, or details about your deployment setup, I’d be happy to offer more personalized advice. I’m here to help you get the best experience possible! Sources: Operational Guidance & Best Practices | livekit/livekit_composite | DeepWik... | livekit-plugins/livekit-plugins-google/livekit/plugins/google/realtime/real... | web/src/components/models-showcase.tsx | Google Gemini LLM | LiveKit Docs | Gemini Live API plugin | LiveKit docs