witty-kangaroo-6889
09/08/2025, 1:43 AMtall-airline-16756
09/08/2025, 1:43 AMtall-airline-16756
09/08/2025, 1:44 AMwitty-kangaroo-6889
09/08/2025, 1:46 AMtall-airline-16756
09/08/2025, 1:46 AMus-central1) so you can cut down on any lag.
• Use the Correct Model: Make sure you’re working with a low-latency model such as gemini-2.5-flash-preview-05-20 for the best speed.
• Minimize System Prompt Size: Keep your system prompt short and sweet—just the essentials. Also, avoid repeating the same context in multiple requests.
• Leverage Caching: Try organizing your prompts so that static parts (like role instructions) are separate from the dynamic user input. If caching is supported, this can really help speed things up.
• Monitor Metrics: Keep an eye on metrics like ttft, input_tokens, and cached_tokens. They’ll give you clues about what’s slowing things down and how your tweaks are working.
If you want, I’d be happy to dive deeper into any of these steps or even help you set up an experiment to test how caching behaves. Just let me know what works best for you!
Sources: Speech & Audio Processing | livekit/livekit_composite | DeepWiki | Gemini Live API integration guide | LiveKit Docs | livekit-plugins/livekit-plugins-google/livekit/plugins/google/models.py | Agent Testing & Evaluation | livekit/livekit_composite | DeepWiki | How can I reduce latency in voice agents using STT, TTS and LLM?witty-kangaroo-6889
09/08/2025, 1:52 AMtall-airline-16756
09/08/2025, 1:52 AMcached_tokens metric in the response metadata. If you see more cached tokens, it means the system is reusing tokens it already processed.
If you want, I’m happy to help you set this up or test how caching works in your setup!witty-kangaroo-6889
09/08/2025, 1:53 AMtall-airline-16756
09/08/2025, 1:53 AMwitty-kangaroo-6889
09/08/2025, 2:00 AM