Closed lusfold closed 4 years ago
especially android 10
It's complicated, but you can try to disable build-in AEC and use AEC3.
could you please tell me how to disable build-in AEC and use AEC3,
I tried all of these and nothing worked
WebRtcAudioUtils.setWebRtcBasedAcousticEchoCanceler(true);//true or false
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googEchoCancellation", "true"));
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googEchoCancellation2", "true"));
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googDAEchoCancellation", "true"));
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googTypingNoiseDetection", "true"));
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googAutoGainControl", "true"));
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googAutoGainControl2", "true"));
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googNoiseSuppression", "true"));
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googNoiseSuppression2", "true"));
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googAudioMirroring", "false"));
audioConstraints.mandatory.add(new MediaConstraints.KeyValuePair("googHighpassFilter", "true"));
Recommend trying webrtc
official demo and test whether aec
works in your phone.
For your information, some other projects are calling setWebRtcBasedAcousticEchoCanceler(false)
on specific phone models. This fixes an echo on calls where the speaker is ON. Many Xiaomi models seem to be affected, but it's not limited to this manufacturer.
See: signalapp/Signal-Android#7635
AEC is not working on some phones, eg Xiaomi 9. It may be problems with the phone. Do you have any idea about this issue? I've taken lof of research and have no answer yet.