Assistant delay when initially responding (outboun...
# support
p
Hey Vapi team - our assistant is primarily outbound and there is a 4 second delay between when the user answers the phone and when our assistant speaks. Here is a call log: 8dc2e057-fa16-4d15-82e6-31a605967912 The delays during the remainder of the calls are within normal limits. Is there a way to reduce this latency upon the answering of the call?
k
You need to change your assistant transcriber endpointing value to 300, as well as start speaking plain waitSeconds to 0.6. These changes will give the assistant transcriber ample amount of time to consider if user has stopped speaking, and then eventually it will be able to identify a single word transcription as well.
Here's the curl request for it.
Copy code
markdown
```bash
curl -X PUT "https://api.vapi.ai/api/assistants/{assistant_id}" \
  -H "Authorization: Bearer {your_api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "transcriber": {
      "provider": "deepgram",
      "endpointing": 300
    },
    "startSpeakingPlan": {
      "waitSeconds": 0.6,
      "transcriptionEndpointingPlan": {
        "onPunctuationSeconds": 0.1,
        "onNoPunctuationSeconds": 1.5,
        "onNumberSeconds": 0.5
      },
      "smartEndpointingPlan": {
        "provider": "livekit",
        "waitFunction": "200 + 8000 * x"
      }
    }
  }'
``` To use this curl command: 1\. Replace
{assistant_id}
with your actual assistant ID 2\. Replace
{your_api_key}
with your VAPI API key 3\. You can modify the
waitFunction
parameter if needed for more specific response timing
z
Thanks for the tip. 1) Created a new assistant with the API 2) Copied my prompt into it with the API using using patch with - temperature": 0.2 - provider": "openai" - model": "gpt-4o", 3) ran the curl request you provided 4) tried a few calls It still takes around 4 seconds for the AI to speak after we pickup and say "Hello" The assistant ID is 11e97801-fc4e-4a60-a029-d8cccc8a7585
k
Can you share the call ID where it is taking assistant 4 seconds to pick up the call?
p
c3748343-304a-4617-8497-2b3a9824151b 3d540bde-e8cb-445a-8880-80329c4cafeb
k
šŸ”µ 21:06:05:900
user
Final Transcript : Hello?: 0.9733887 šŸ”µ 21:06:06:005 AzureOpenAIRequest. Messages: \[ { "role": "system", "content": "Introduction\\nYou are a friendly assistant named Av..." }, {"role": "user", "content": "Hello?"} \] šŸ”µ 21:06:06:453 \[user LOG\] Model output: Hi šŸ”µ 21:06:06:743 ElevenLabs (Websocket #0) Pushing 130... "Hi, I'm Ava with Super Unit. I'm calling to verify the employment of a current or former employee at Mainline Protective Services." šŸ”µ 21:06:06:743 \[user CHECKPOINT\] Voice audio requested šŸ”µ 21:06:07:989
assistant
Partial Transcript : Hi. I'm Ava: 0.8840332 šŸ”µ 21:06:10:174
assistant
Final Transcript : Hi. I'm Ava with Super Unit. I'm: 0.9995117 @PM6852 It is taking approximately two seconds to generate the first response message like because of the first message mode which is model generates the first message and it is something which cannot be reduced as of now. But eventually, over time, this time will also be reduced.
Let me know if you have further questions or more doubts. I'd be happy to help.