https://retellai.com/?utm_source=discord&utm_medium=seo logo
I have integrated your application using the SDK y...
# ❓・ai-evy-support
s
@AI Evy I have integrated your application using the SDK you provide to my website. There issue is that its taking like 5sec to initilize the calling from the SDK. can you please tell me why this latency is there and how can i reduce this?
a
Thanks for tagging me @sagar_67805. I'll look through relevant sources and get back to you shortly.
### Answer The 5-second initialization latency you're experiencing isn't specifically addressed in the available documentation. However, I can provide some context about Retell AI's latency monitoring capabilities. Retell AI provides detailed latency tracking that you can monitor in the "Call History" section [(1) ]() . End-to-end latency measures the total time from when the user stops speaking until the AI agent begins responding, which includes processing time, network delays, and model inference time . The system tracks several key latency metrics : - **P90 (90th Percentile) **: 90% of calls have latency below this value - **Median (50th Percentile) **: Half of the calls have latency less than this value - **Min**: The fastest response time achieved in any call For web calls specifically, the frontend web JS SDK abstracts away audio complexity, with user audio captured in PCM format and sent to the backend for processing [(2) ]() . To troubleshoot your initialization delay, you can: 1. Check your call history in the dashboard to monitor actual latency metrics [(1) ]() 2. Review the public log available through the get-call API for detailed request/response information and latency tracking [(3) ]() The sources don't provide specific guidance on reducing SDK initialization time. For more targeted assistance with this specific issue, I'd recommend: - Visit [Contact Sales]() - Visit [) Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Check actual latency](https://docs.retellai.com/reliability/check-actual-latency) [[2] Audio Basics](https://docs.retellai.com/knowledge/audio-basics) [[3] Get Call](https://docs.retellai.com/api-references/get-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
@AI Evy I think you miss understood. The latency is not there in call its minimal but the latency is in start calling. If i press the start call button in web which i have integrated on website via SDK you provide so the issue is that when i click the button to start the call it is taking like 5 sec before starting the call. So how can i reduce the limit of it?
a
Thanks for the follow-up, @sagar_67805. I'll get back to you soon.
### Answer I understand you're experiencing a 5-second delay when clicking the start call button before the call actually begins, not during the call itself. Based on the web call documentation, there are a few factors that could contribute to initialization delays: The web call process involves these steps [(1) ]() : 1. Your client calls your server endpoint to get an access token via
create-web-call
2. The access token is used to start the call with
retellWebClient.startCall()
The documentation mentions that "if you do not start the call within 30s obtaining the access token, we will invalidate it and the call will be marked with error" , which suggests there's some time-sensitive processing happening. When starting a call, the SDK allows optional configuration that might affect initialization time :
Copy code
javascript
await retellWebClient.startCall({
  accessToken: createCallResponse.access_token,
  sampleRate: 24000, // (Optional) set sample rate of the audio capture and playback
  // (Optional) device id of the mic.
  captureDeviceId: "default",
  // (Optional) device id of the speaker
  playbackDeviceId: "0ec1807fd0fe6e51b990660ec4e2ebb78sdfcba51e279815d00c423ce03407ff",
  // (Optional) Whether to emit "audio" events that contain raw pcm audio bytes represented by Float32Array
  emitRawAudioSamples: false,
}) ;
The 5-second initialization delay you're experiencing isn't specifically addressed in the available documentation. For targeted assistance with this specific SDK initialization issue: - Visit [Contact Sales]() - Visit [) Would you like a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Connect to web call](https://docs.retellai.com/deploy/web-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.