Agent hung up due to too much background noise
# support
d
During a test call, we called our agent from a location where there was a lot of background noise. The agent could not understand what I was saying and automatically hung up. Is there anyway to determine when something like this occurs, can we add a message to Vapi agents saying something like "I am detecting too much noise from your end, I cannot hear you. I will end the call, call back later when it is less noisy." Because currently, I believe that what is happening is that it just hears constant input and it cannot handle this for a long period.
v
@DaVenthus Absolutely, you can implement a feature to detect high levels of background noise and respond accordingly. To achieve this, you would typically need to integrate a noise detection algorithm into your voice processing pipeline. When the algorithm detects excessive noise, you can trigger a response from the VAPI agent to inform the caller of the issue before ending the call. Here's a high-level approach to how you might implement this: 1. **Noise Detection**: Implement or integrate a noise detection system that can measure the noise level of the incoming audio in real-time. 2. **Threshold Setting**: Define a threshold for what is considered excessive noise. 3. **Decision Logic**: When the noise level exceeds the threshold, trigger a decision logic that initiates the agent's response. 4. **Agent Response**: Program the VAPI agent to deliver the message about the noise issue ("I am detecting too much noise from your end, I cannot hear you. I will end the call, call back later when it is less noisy."). 5. **End Call**: After delivering the message, the agent can then end the call. This feature would require additional development on your voice processing system and is not something that can be directly configured through VAPI without custom development. If you need assistance with the implementation or have any further questions, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
s
Hey @DaVenthus To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help me figure out what went wrong!
d
It must be either one of these call ID's. I'm not 100% sure which one to be honest it has been a couple days. - ac7b4e8b-15f7-4887-847f-d2234f193395 - 0b995314-1965-45a2-9ad7-406ce39bc0a0 - 3c08f116-74c3-4837-aa59-af847282cad8 Because of the noisyness, it was not about a specific timestamp. She could just not understand that their was a lot of noise. I believe that what happened is that she detected the input was too long, or something in that regard. What I would like to happen in future cases, is that if she detects a continuos input or noisyness/unclear input. She will speak a predetermined message (one that I can define) someting like "I cannot hear you correctly, the background is too noisy. Call back when it is less noisy" Right now, she just hung up the call without mentioning anythign about the noise
s
@DaVenthus there are two ways to tackle either using prompting to instruct the LLM to inform the user if it's goes out of context then generat an message saying "step aside from nosie place" . Now alternative to this approach is used background noise denoizer which isolates the user audio. I suggest using both techniques to handle these type of situations.
Let me know if you require further help!!