StevePaganelli
04/23/2025, 2:49 AMVapi Support Bot
04/23/2025, 2:51 AMstartSpeakingPlan.waitSeconds
to introduce a delay before the assistant starts speaking:
javascript
const assistant = {
firstMessageMode: 'assistant-speaks-first',
startSpeakingPlan: {
waitSeconds: 2 // Waits 2 seconds before speaking
}
// ... other configurations
};
According to [Discord conversations](https://discord.com/channels/1211482211119796234/1343915991670853654), the default is 0.4 seconds, but increasing it to 0.8 or higher can give enough time for processing.
2. Add conditional delays with custom endpointing rules - You can use customEndpointingRules
with the delayMs
parameter:
javascript
startSpeakingPlan: {
customEndpointingRules: [
{
type: 'assistant',
regex: '.*voicemail.*', // Adjust based on your needs
delayMs: 3000 // Adds a 3-second delay
}
]
}
3. Change the first message mode - Setting firstMessageMode
to assistant-waits-for-user
can prevent the assistant from picking up immediately, as mentioned in the [voicemail detection documentation](https://docs.vapi.ai/phone-calling/voice-mail-detection).
4. Configure base delay seconds - You can use backoffPlan.baseDelaySeconds
to introduce an initial delay before the assistant picks up the call.
5. Adjust voicemail detection settings - According to [troubleshooting information](https://discord.com/channels/1211482211119796234/1341683766397108287), some users solved similar issues by deactivating the voicemail function or adjusting parameters like machineDetectionTimeout
.Vapi Support Bot
04/23/2025, 2:51 AMKings_big💫
04/23/2025, 9:03 AM