Tool execution interrupts voice generation
# support
d
Whenever the agent is talking when a tool call is being triggered, the voice generation is interrupted in middle of sentence and then there is a silence until tool result come back. callID: 3f47c6a9-e312-4e8c-aac3-de4373846b09 @ 2:30min
v
Thank you for reporting this issue. To help diagnose the problem, could you confirm whether your tool is configured with "async": true in its settings? This option allows the assistant to continue speaking while the tool executes, which may help avoid the silence you described. If possible, please share whether you are using async mode or any custom messages during tool execution. Source: - [Custom Tools Documentation](https://docs.vapi.ai/tools/custom-tools)
d
My tools are all async = false since the agent need to wait for the response before proceeding. I cannot set them to async = true but I still need to find a way that the voice generation that is being spoken at the time of the tool trigger is not cut mid sentence.
c
Hey! Can you try 2-3 calls by setting your Twilio messages to NULL? Let me know how it goes for you.
d
@User Please elaborate what you mean by setting Twilio Mesage to Null. This issue is happening on webcalls as well
c
Hey Sandman, apologies instead of Twilio I was trying to write tool. So you have to set your tool messages to null and then try to do two or three calls.
d
Hey @Shubham Bajaj ,yes I tried with the tool messages being Null and the interruption still happens. Is it something that is normal ? Ive been trying to prevent the model to output long generation before executing a tool call but this situation still happens.
Even when my tool is async = true and tool.messages = nulll, the agent voice generation is being cut when the tool response is received. Here is another example: CallId: f5843b09-db24-4c48-8c7d-6e6b15236eb1 @ 1:38 the agent was annoucing that its gonna send a code and the voice generation is cut in the middle when it receives the tool response and just skip to the next voice generation.
c
Regarding the tool async setting, you don't need to set it to true. If you do, it means you don't want to wait for the tool response and proceed without it, which could result in a generated response. Instead, you want the response based on the tool call, so set it to false. Please note that Tool.message set to null won't work.. Additionally, avoid setting the request complete message, as it will be used once the tool call is resolved and the tool async setting is set to false. Currently, we are facing an ongoing issue where the LLM generates a response and simultaneously performs tool scrolling. This results in the previous LLM-generated response being cut off. To address this issue, you need to introduce a delay on your server. This delay ensures that the response is returned after a certain period, with some estimation to determine when the LLM response will be voiced out. I apologize for any inconvenience caused by this additional delay. We are actively working on resolving this pipeline change, but it is a product decision, so it may take some time.
5 Views