vad.on('silence', () => {
setTimeout(respond, 300);
});const { endOfTurnMs } = config.turnDetection;
vad.on('silence', (transcript: string) => {
const wait = endsWithFiller(transcript) ? endOfTurnMs * 2 : endOfTurnMs;
timer = setTimeout(respond, wait);
});
vad.on('speech', () => clearTimeout(timer));The delay comes from config, waits longer after filler words and is cancelled when the user keeps talking.
It uses a model that looks at the words, not just silence, to judge whether the sentence is complete, so the agent waits during thinking pauses.
The end-of-turn silence is too short, so a natural pause counts as the end of the turn. Increase the delay or add semantic turn detection.
The end-of-turn delay may be too long, or stages after it are slow. Measure the time from end of speech to first audio for each stage.