<#C088ZNU7QQ5|ask-ai> i am getting inference is sl...
# ask-ai
s
#ask-ai i am getting inference is slower than real time in the logs. in what suitation we will get this .
t
Thanks for reaching out, Karthik. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're seeing "inference is slower than real time" when the processing pipeline (STT → LLM → TTS or other model steps) takes longer than the audio/interaction duration. Common situations that cause this: • High latency from model providers: public inference endpoints can queue requests under load, causing spikes in response time. • Burstable cloud instances (e.g., AWS t3/t4): CPU credits can be exhausted and the instance gets throttled, making short tasks take seconds instead of milliseconds. • Network congestion or protocol limits: non-WebRTC paths (TCP/WebSocket) can suffer head-of-line blocking or packet loss, causing stalls. • Slow model architecture or unoptimized inference: some models or EOU detection components are inherently slower and add up across the pipeline. • Downstream API calls or external services: slow or retrying API requests (DBs, microservices) delay overall response. • No provisioned capacity: relying on shared endpoints without reserved capacity can lead to contention and slower inference. • Unoptimized deployment (insufficient compute or wrong instance types): lack of predictable resources or poor co-location increases latency. If you want, tell me: • which models/providers you’re using, • your deployment type (instance family, e.g., t3/t4 or m5/c5), and • whether you see network or external API delays — and I’ll suggest targeted mitigations. Sources: Introducing LiveKit Inference: A unified model interface for voice AI | Troubleshooting Latency and Timeout Errors with Turn Detection on AWS | An open source stack for real-time multimodal AI | Improving voice AI&#39;s turn detection with transformers | https://blog.livekit.io/streamline-troubleshooting-with-agent-observability/#/portal|
s
i am usisng deepgram for stt, groq as llm and edge tts for tts. i have deployed in the cererium there are no external api delays
t
Thanks — that helps. A few targeted questions and checks will quickly narrow the cause given Deepgram (STT), Groq (LLM), and Edge TTS on Cererium: 1. Are the STT, LLM, and TTS services co-located (same AZ/region) in Cererium, or do any hops cross regions? 2. Which Groq model/endpoint are you using and is it a hosted shared endpoint or provisioned instance? 3. Are you observing the slowdown during a particular pipeline stage? Check timestamps/metrics for: STT latency, LLM request-to-response, TTS synthesis time. Which stage shows the largest wall-clock time? 4. What instance family/type runs your agent process in Cererium (burstable like t3/t4 or fixed like m5/c5)? Are CPU credits or throttling metrics available? 5. Are you batching requests or sending them per-utterance? If batching, what batch sizes and concurrency? 6. What audio length/utterance duration typically triggers the warning? Short utterances can be impacted differently than long ones. 7. Can you share recent per-request latencies (sample traces) for one slow event (STT, LLM, TTS durations)? A single example helps pinpoint whether the LLM, model provider queueing, or local CPU is the bottleneck. If you prefer next steps immediately, try these in parallel: • Verify service co-location and reduce cross-region hops. • Confirm Groq endpoint has provisioned capacity (not a shared congested endpoint). • Move agent off burstable instances to a fixed CPU family or check CPU credit balance. • Capture a single request trace (timestamps for STT start/end, LLM start/end, TTS start/end) and send the numbers — I’ll interpret them and recommend specific fixes. Which check would you like to run first, or can you share one slow-request trace?