Sudden Slow responses
# support
s
Hello Vapi Team So for the last 5-6 days I was building my agent, and everything was fine The latenct was great, hooked it up with my external apps, and I just got my phone with twilio and was ready to launch today However now when I tried to test the bot one last time, the latency is HUGE, there can be 3-9 seconds before the AI answers where previously it was under a second Tried building a new agent | call ID : 8aac68ab-68fe-4d38-ab18-50a6173d3ecc Original Agent I was working on for the past week : Call ID when everything was good : 098970d9-9367-4fc5-a134-f377cab27085 Same Agent, no changes made, Crazy latency call ID : 490922cd-b4e9-4460-b467-21953477fbde Thank you in advance!
v
Hi there! 👋 I understand how frustrating sudden latency issues can be, especially when you're ready to launch. I'm unable to determine the exact cause of the sudden latency increase in your specific agent without examining the call logs in detail. However, I can definitely help you troubleshoot this issue! Based on the information I found, here are some steps you can take to troubleshoot the latency issue: ## Initial Troubleshooting Steps - **Check API keys and access permissions**: Ensure they are correct and haven't been revoked or expired - **Review recent code or settings changes**: Look for anything that might have inadvertently affected the agent's ability to receive voice input - **Test in a different environment**: If possible, rule out device-specific or network-related issues - **Check Network Latency**: Verify the network latency from your system to the API endpoints ## Investigate Potential Causes Several factors could contribute to latency in Vapi AI agents: 1. **Third-party Services**: If your application relies on services like OpenAI, Deepgram, or 11Labs, check their status and response times. According to [troubleshooting documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333877747453395014), monitoring response times from services like ChatGPT can help identify bottlenecks. 2. **VAPI Configuration**: Review your VAPI configuration, especially settings like: -
silenceTimeoutSeconds
-
responseDelaySeconds
-
llmRequestDelaySeconds
-
startSpeakingPlan.waitSeconds
(try setting to 0.8) -
smartEndpointingEnabled
(set to
false
if using non-English transcriptions) -
transcriber.endpointing
(set to 300 for Deepgram) 3. **Resource Utilization**: Monitor the server or service hosting your voice application for CPU, memory, and bandwidth usage. ## Using Your Call IDs for Debugging
The call IDs you've provided (8aac68ab-68fe-4d38-ab18-50a6173d3ecc, 098970d9-9367-4fc5-a134-f377cab27085, and 490922cd-b4e9-4460-b467-21953477fbde) are very helpful for debugging. According to [debugging documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333472116984778894), you can: 1. Examine logs associated with these specific call IDs to diagnose the cause of latency 2. Compare the logs between the good performance call (098970d9-9367-4fc5-a134-f377cab27085) and the high latency call (490922cd-b4e9-4460-b467-21953477fbde) to identify differences ## Contact Support If you're still experiencing issues after trying these steps, I recommend contacting the VAPI support team at support@vapi.ai with: - The call IDs you provided - Timestamp of the issues - Expected response time vs. actual response time Would you like me to provide more specific information about any of these troubleshooting areas? Sources: - [Troubleshooting sudden latency increase in Vapi AI agent](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334024569861963788) - [Potential causes of latency in Vapi AI agents](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1332286268805087272) - [Debugging latency issues in Vapi using call IDs](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333472116984778894) - [Vapi agent best practices for low latency](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336685825227755591)
Have you made any changes to your LLM provider or voice settings recently? Also, which third-party services (OpenAI, Anthropic, Deepgram, 11Labs, etc.) are you using with your agent? This information would help narrow down the potential causes of the latency spike. Sources: - [Potential causes of latency in Vapi AI agents](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1332286268805087272) - [Troubleshooting sudden latency increase in Vapi AI agent](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334024569861963788)
v
Hi there! 👋 I see you're experiencing high endpointing latency of 4766ms, which is definitely causing those delays you mentioned. I don't have all the details about your specific setup, but I can help you address this endpointing latency issue based on the information I found. Looking at your logs, the endpointing is the main bottleneck (4766-7559ms) rather than the transcription, model, or voice synthesis. Here's how you can fix this: ### Endpointing Configuration Adjustments 1. **Adjust
smartEndpointingEnabled
setting**: - Set
smartEndpointingEnabled
to
false
, especially if you're using non-English transcriptions - According to [troubleshooting documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1332286268805087272), this can significantly reduce endpointing latency 2. **Modify transcriber endpointing value**: - Set
transcriber.endpointing
to 300ms (especially if using Deepgram) - This is recommended in [latency optimization guides](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331035264751112202) 3. **Adjust
startSpeakingPlan
settings**: - Set
startSpeakingPlan.waitSeconds
to 0.8 - This can help reduce the perceived latency according to [best practices](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1331035264751112202) 4. **Review other timing parameters**: - Check
silenceTimeoutSeconds
,
responseDelaySeconds
, and
llmRequestDelaySeconds
settings - These can all impact the overall responsiveness of your agent If you're still experiencing issues after making these changes, would you be able to share which transcription service you're using and any other configuration details? That would help me provide more targeted advice! Sources: - [Troubleshooting sudden latency increase in Vapi AI agent](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1332286268805087272)
s
current
"startSpeakingPlan": { "waitSeconds": 0, "transcriptionEndpointingPlan": { "onPunctuationSeconds": 0.1, "onNoPunctuationSeconds": 1.5, "onNumberSeconds": 0.5 }, "customEndpointingRules": \[\], "smartEndpointingPlan": { "provider": "livekit", "waitFunction": "200 + 8000 \* x" } }
next
"startSpeakingPlan": { "waitSeconds": 0.6, "smartEndpointingPlan": { "provider": "livekit"} } Hey Simon, set your start speaking plan wait seconds to 0.6, smart endpointing plan to LiveKit, and remove the transcription endpointing plan. The latency you're observing is all because of endpointing at first glance, which means it's taking time to recognize if the user has stopped speaking. Do these changes to your assistant, and then let me know how it goes for you