Hold a function call until the user's turn is confirmed
Deepgram's documentation explains how to hold Voice Agent function calls until the user's turn is confirmed. You can use this for actions like ending a call or booking a reservation that someone might amend before finishing their sentence.
Set defer_until_eot: true on each function that should wait. If the user resumes speaking before turn confirmation, the agent discards the deferred call before it runs. Functions that haven't opted in still dispatch immediately. Deferral works with every listen provider.
If your client receives FunctionCallCancelled, stop work on that call's id and don't reply to it. Cancellation doesn't undo a server-side action that already reached your endpoint, so defer actions that can't be taken back.
Power enterprise voice solutions with Deepgram’s Speech-to-Text, Text-to-Speech, and Voice Agent APIs. Real-time, accurate, and built for scale.