Hey there! To help improve latency for E2E, LLM, TTS, and EOU metrics, here are some friendly tips you might find useful:
•
Optimize Network Proximity: Try placing your server closer to the LLM, STT, and TTS services. This can really cut down on round-trip time.
•
Use Streaming APIs: Streaming APIs for STT, LLM, and TTS are great because they let you process parts of the data as they come in, which means less waiting around.
•
Parallel Processing: Whenever you can, run tasks like transcription and LLM inference at the same time to speed things up.
•
Analyze Metrics: LiveKit’s metrics API is super helpful for spotting where delays happen. Keep an eye on TTFT (LLM responsiveness), TTFB (TTS responsiveness), and EOU delay.
•
Low-Latency Providers: Picking providers with lightweight or edge-optimized models can make a big difference for real-time interactions.
•
Enable Telemetry: Don’t forget to use LiveKit’s OpenTelemetry integration for a deeper look into performance.
Following these steps should help you bring down latency across your pipeline. If you want, I’m here to help with any of these—just let me know!
Sources:
Agent Testing & Evaluation | livekit/livekit_composite | DeepWiki |
Voice Assistants | livekit/livekit_composite | DeepWiki |
Voice Assistants | livekit/livekit_composite | DeepWiki |
How can I reduce latency in voice agents using STT, TTS and LLM? |
Capturing metrics | LiveKit Docs