https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hello, I got this problem when calling from mobile...
# ❓・ai-evy-support
u
@AI Evy Hello, I got this problem when calling from mobile device call_analysis: { call_summary: 'The agent and user are stuck in a loop of greetings and introductions. The user is trying to say their name, but the agent keeps repeating its introduction, resulting in a conversational breakdown.', in_voicemail: false, user_sentiment: 'Neutral', call_successful: false, custom_analysis_data: {} },
a
Thanks for tagging me @10v32616. I'll look through relevant sources and get back to you shortly.
### Answer Looking at your call analysis showing a conversational loop where the agent keeps repeating its introduction, this appears to be a turn-taking or prompt configuration issue. For troubleshooting this type of conversational breakdown, you can examine the call details using the get-call API endpoint to access the full transcript and identify where the loop begins [(1) ]() . The call analysis indicates
call_successful: false
, which suggests the agent couldn't complete its intended conversation flow. To debug this issue: 1. Check your agent's prompt configuration - Ensure your agent has clear instructions for handling user responses and moving the conversation forward rather than repeating introductions. 2. Review the full transcript - You can retrieve detailed conversation data including the
transcript_object
which shows the exact exchange between agent and user [(1) ]() [(2) ]() . 3. Monitor latency metrics - High latency can contribute to turn-taking issues. If your end-to-end latency P90 exceeds 3 seconds, this could cause conversational problems [(3) ]() . The
call_analysis
object you're seeing is part of the standard call response that includes
call_summary
,
user_sentiment
, and
call_successful
fields [(1) ]() [(2) ]() . This analysis correctly identified the conversational loop, which helps pinpoint that the issue is likely in your agent's conversation handling logic rather than technical connectivity problems.
​ To learn more, see the sources I considered: [[1] Update Call](https://docs.retellai.com/api-references/update-call) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] Troubleshoot high latency](https://docs.retellai.com/reliability/troubleshoot-latency) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
u
@AI Evy Then what should I do, decrease the reponsiveness ?
a
Thanks for the follow-up, @10v32616. I'll get back to you soon.
### Answer Decreasing responsiveness might help with your conversational loop issue. The
responsiveness
parameter controls how responsive the agent is, with values ranging from [0,1] [(1) ]() [(2) ]() [(3) ]() . Lower values mean less responsive agent (wait more, respond slower) , while higher values mean faster exchanges . For your specific problem where the agent keeps repeating introductions, you should also consider adjusting
interruption_sensitivity
. This controls how sensitive the agent is to user interruptions, with values ranging from [0,1] . Lower values mean it will take longer/more words for the user to interrupt the agent, while higher values make it easier for users to interrupt . When set to 0, the agent would never be interrupted . You can update these settings using the Update Agent API or through the conversation flow global settings [(4) ]() . In conversation flows, you can adjust responsiveness in the speech settings section . You can also dynamically update these values during a call using the LLM WebSocket Update Agent Event [(5) ]() . Based on community experience, some users have found success with prompt-based solutions for handling interruptions and conversational flow issues [(6) ]() . The key is finding the right balance between responsiveness and allowing users to properly interact without the agent cutting them off or getting stuck in loops.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
u
@AI Evy is there any problem, if I set the Default Microphone Sample Rate = 24000 , because I use an livekit SDK on unity, and it has to be lower sample rate to work
a
Thanks for the follow-up, @10v32616. I'll get back to you soon.
### Answer [(1) ]() For web calls, you can set the sample rate to 24000 Hz when starting a call with the Retell Web SDK . The
sampleRate
parameter is optional and can be configured as follows:
Copy code
javascript
await retellWebClient.startCall({
 accessToken: createCallResponse.access_token,
 sampleRate: 24000, // (Optional) set sample rate of the audio capture and playback
 // (Optional) device id of the mic.
 captureDeviceId: "default",
 // (Optional) device id of the speaker
 playbackDeviceId: "0ec1807fd0fe6e51b990660ec4e2ebb78sdfcba51e279815d00c423ce03407ff",
 // (Optional) Whether to emit "audio" events that contain raw pcm audio bytes represented by Float32Array
 emitRawAudioSamples: false,
}) ;
The documentation indicates that 24000 Hz is a supported sample rate option for web calls . However, I don't have specific information about LiveKit SDK integration with Unity or any potential issues that might arise from using a 24000 Hz sample rate in that specific configuration. For more detailed information about audio handling and sample rates, you might want to review the [Audio Basics]() documentation [(2) ]() .
​ To learn more, see the sources I considered: [[1] Connect to web call](https://docs.retellai.com/deploy/web-call) [[2] Audio Basics](https://docs.retellai.com/knowledge/audio-basics) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
u
@AI Evy I check the transcript, it look like when the agent says something, the microphone will record and think this is user, so it send back to the agent as a user message transcript: 'Agent: Coucou, \n' + 'User: Cuckoo says the \n' + 'Agent: c’est le docteur Sirop au \n' + 'User: doctor is here off.\n' + 'Agent: Hi \n' + 'User: Hi there.\n' + 'Agent: there! It \n' + 'Agent: Hi \n' + 'User: Hi \n' + 'Agent: there! I’m \n' + 'User: there.\n' + 'Agent: Hi \n' + 'User: Hi \n' +
a
Thanks for the follow-up, @10v32616. I'll get back to you soon.
### Answer --- Your transcript shows a classic echo/feedback issue where the agent's own speech is being picked up by the microphone and transcribed as user input [(1) ]() . This creates the conversational loop you're experiencing. For handling this type of background speech issue, Retell AI provides denoising mode settings [(2) ]() . You can configure the
denoising_mode
parameter to address echo and feedback problems [(3) ]() :
Copy code
javascript
denoising_mode: "noise-and-background-speech-cancellation"
The available denoising modes are [(2) ]() : - `noise-cancellation`: Default mode that removes background noise with minimal impact on speech accuracy - `noise-and-background-speech-cancellation`: More aggressive mode that removes both background noise and background speech, though it may distort the waveform and incurs a $0.005/min surcharge For your specific echo issue, try the more aggressive
noise-and-background-speech-cancellation
mode . Additionally, you can adjust the
interruption_sensitivity
parameter to make the agent less sensitive to false interruptions [(3) ]() :
Copy code
javascript
interruption_sensitivity: 0.8
Lower values mean it takes longer/more words for the user to interrupt the agent . For extremely noisy environments with echo, you may need to experiment with even lower settings [(2) ]() . Since you're using LiveKit SDK with Unity, ensure proper echo cancellation is configured on the client side as well. The combination of client-side echo cancellation and Retell's aggressive denoising mode should resolve the feedback loop.
​ To learn more, see the sources I considered: [[1] Troubleshooting AI Voice Agent Issues | Retell AI](https://www.retellai.com/blog/troubleshooting-common-issues-in-voice-agent-development) [[2] Handle background speech & noise](https://docs.retellai.com/build/handle-background-noise) [[3] Update Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
u
@AI Evy I still can
a
Thanks for the follow-up, @10v32616. I'll get back to you soon.
### Answer Your message appears to be incomplete - you wrote "I still can" but didn't finish your thought. Based on the conversation thread, you're dealing with an echo/feedback issue where the agent's speech is being picked up as user input. If you're still experiencing problems after trying the denoising settings, here are additional troubleshooting steps: For persistent echo issues with Unity/LiveKit integration: 1. Verify client-side echo cancellation - Ensure your Unity LiveKit SDK has proper echo cancellation enabled on the client side [(1) ]() 2. Test different denoising combinations - Try experimenting with both the
denoising_mode
and
interruption_sensitivity
settings together 3. Check audio routing - Make sure your Unity audio output isn't being routed back to the microphone input 4. Consider hardware factors - Mobile device speakers and microphones in close proximity can create feedback loops that require both client and server-side mitigation If you're still having issues, could you complete your question so I can provide more specific guidance? For example, are you still experiencing the echo problem, or have you encountered a new issue?
​ To learn more, see the sources I considered: [[1] Troubleshooting AI Voice Agent Issues | Retell AI](https://www.retellai.com/blog/troubleshooting-common-issues-in-voice-agent-development) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
u
@AI Evy I still can't make the conversation work well, because the echo is recording too good. I try many ways to fix, even mute the microphone when the agent talking, and start unmute when agent stop to only record the sound, but can't work
a
Thanks for the follow-up, @10v32616. I'll get back to you soon.
### Answer Your echo issue is severe and requires more aggressive settings. Since you've tried client-side muting without success, focus on these Retell AI server-side configurations: Set the most aggressive denoising mode: [(1) ]()
Copy code
javascript
"denoising_mode": "remove noise + background speech"
This mode removes both background noise and background speech, though it might distort the waveform and incurs a $0.005/min surcharge . For your severe echo case, this is necessary . Set interruption sensitivity very low: [(2) ]()
Copy code
javascript
"interruption_sensitivity": 0
When interruption sensitivity is set to 0, the agent would never be interrupted . This prevents the echo from cutting off the agent mid-sentence . Additional settings to try: [(1) ]() - Set interruption sensitivity to 0.8 first, then gradually lower it if needed - For extremely noisy environments, you may need to experiment with even higher settings Community solutions that have worked: [(3) ]() Some users have successfully handled interruption issues through prompt engineering, where they instruct the AI to ask "Did you say something?" when it detects potential interruptions, allowing for graceful recovery from false positives . The combination of the aggressive denoising mode and zero interruption sensitivity should prevent the echo from being transcribed as user input and interrupting the agent's speech flow.
​ To learn more, see the sources I considered: [[1] Handle background speech & noise](https://docs.retellai.com/build/handle-background-noise) [[2] Update Agent](https://docs.retellai.com/api-references/update-agent) [[3] Discord message from @bajacheebo on 2025-01-07](https://discord.com/channels/1186424376300679209/1294891368505937952/1325992277759365161) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.