Acoustic Echo Cancellation on Android

379 views
Skip to first unread message

Firas Al Kafri

unread,
Nov 27, 2015, 1:53:29 AM11/27/15
to discuss-webrtc
Hello,

We are trying to enable the already implemented echo cancellation technology.

Scenario:

Two android devices are successfully connected and voice is perfectly fine on both devices. 

Device-1 activates Speakerphone:

AudioManager audioManager = ((AudioManager) getSystemService(AUDIO_SERVICE));
audioManager
.setMode(AudioManager.MODE_IN_COMMUNICATION);
audioManager
.setSpeakerphoneOn(false);

Device-2 Hears themselves when they talk

Henrik Andreasson

unread,
Nov 27, 2015, 3:38:00 AM11/27/15
to discuss...@googlegroups.com
I fail to understand how this question is related to WebRTC. Care to elaborate?

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/500d82be-d4b3-4973-8425-7df58fd064bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Abhishek Kumar Gupta

unread,
Jun 3, 2019, 9:45:25 AM6/3/19
to discuss-webrtc
Hi Firas Al Kafri,

Have you found the solution for the issue. I am also facing the same issue.
Any help or guidance will be well appreciated.

Phil

unread,
Jun 4, 2019, 3:05:05 AM6/4/19
to discuss-webrtc
Hi Abhishek,

This will help you.

WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true);
WebRtcAudioUtils.setWebRtcBasedNoiseSuppressor(true);

Abhishek Kumar Gupta

unread,
Jun 23, 2020, 6:33:00 PM6/23/20
to discuss-webrtc
Hi Phil,

With your suggestion, issue got resolved in most of the devices. But still I am facing the same issue in few devices like Motorola One Power (Android 10), Redmi Note 5 Pro (Android 7.1.2).

Any help or advice will be well appreciated. 



On Friday, 27 November 2015 12:23:29 UTC+5:30, Firas Al Kafri wrote:

Abhishek Kumar Gupta

unread,
Jul 6, 2020, 11:16:06 AM7/6/20
to discuss-webrtc

Some phones can't do hardware echo cancellation, even though they advertise it's available. Redmi Note 5 is definitely one of them, take a look at https://github.com/signalapp/Signal-Android/blob/master/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java, search for HARDWARE_AEC_BLACKLIST. So, to enable WebRTC AEC, use below methods of JavaAudioDeviceModule.class

setUseHardwareAcousticEchoCanceler(false)       
setUseHardwareNoiseSuppressor(false) 

(For reference, please have a look into createJavaAudioDevice() of PeerConnectionClient.java - Checkout official android example on googlesource.com

Reply all
Reply to author
Forward
0 new messages