Hi LiveKit team, I’ve deployed my voice agent to ...
# agents
f
Hi LiveKit team, I’ve deployed my voice agent to a production server, and I’m seeing a big performance difference compared to local testing. When I run the agent locally, everything works smoothly — STT is fast, responses are quick, and the interaction works perfectly when tested through the LiveKit Playground. However, after deploying the same agent to my server, there is a significant delay in STT and overall agent response time. The exact same code works fine locally, but in the deployed environment the audio processing becomes slow and the agent replies very late. I’m not sure what is causing this difference (network latency, TURN routing, GPU/CPU limitations, or server configuration). Could you please help me understand what might be causing the delay or guide me on what I should check on my side?
s
iam facing the similar issue
l
I’m not sure what is causing this difference (network latency, TURN routing, GPU/CPU limitations, or server configuration).
So, this is a self-hosted agent? Do you see the same latency if you deploy your agent to LK cloud?
f
When I run it locally on my own machine, everything works perfectly — no noticeable latency. But when I deploy the same agent to LiveKit Cloud, that’s where I start seeing the delay. STT becomes slow and overall responses take significantly longer, even though the code and model configuration are identical.
l
What is your project ID? It will start with
p_
f
p_1xvkf37595n i think
Copy code
<https://cloud.livekit.io/projects/p_1xvkf37595n/overview>
l
I see, can you try using LK inference rather than plugins? That ensures that the models being used are located close to where the agent is deployed, resulting in lower latency. The other suggestion is to maybe use Agent Insights to understand where exactly the delay is happening: https://docs.livekit.io/agents/observability/
f
sure
Thanks for the suggestion! I did look into LiveKit Inference — the concept is great and I understand how having models deployed close to the agent would reduce latency. However, in my case I specifically need to use these external models: • Groq STT (
whisper-large-v3-turbo
) • OpenAI GPT-4.1 for LLM • OpenAI TTS (tts-1, alloy) My agent configuration relies on these providers because they give me the accuracy, speed, and behavior I need for the interview flow. So switching completely to LiveKit Inference isn’t an option for me right now.