How to eliminate Acoustic echo / feedback with android app, when using speaker mode

Hello,

I’m using the Android-sample app from here: https://github.com/OpenVidu/openvidu-tutorials/tree/master/openvidu-android

I added the following Audio-Manager related code when the socket is connected, to make the the sound come out from the device’s speaker. Without that, the sound actually plays from the earpiece instead of the speaker:
audioManager.setSpeakerphoneOn(true); audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);

So, when using the app with 2 mobile devices, we observe that there is a lot of echo. See below scenario:
• Person A & Person B joined the session.
• Person A says “Hello!”
• Person B hears ‘Hello’ on his device speaker, & this again gets transmitted back to Person A & he also hears his ‘Hello’ back as an echo.

Needless to say, this doesn’t provide a very good experience when conversing.

We found that the issue isn’t present when using other apps based on WebRTC on the same set of devices, so this isn’t a hardware issue.

I tried to use the following in the code, but it didn’t help either:
WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true); WebRtcAudioUtils.setWebRtcBasedNoiseSuppressor(true);

Is there any way to minimize/eliminate this somehow? Either via server-side config changes or from the app-side?

We haven’t experienced this issue in our tests.

Can you test with official ionic tutorial to test if you have the same behavior?

Hi Kiran,
at the moment we are running in the same kind of problem. Have you find a solution over the last month?