Sound echo during playback of the received sound in real time

I am trying to get the sound from the headset microphone using AudioRecord and playing real-time audio in the headphones using AudioTrack . I have executed the required code, but the problem is that there is a disturbing echo. I do not use speakers and I use headphones. So what causes this echo? I used the echocanceller device, which appeared at API level 11, and the echo decreased but did not disappear. I know the sound delay in android devices , but I can not understand how the delay can cause an echo when I use the headphones. Please guide me in the right direction.

+4
source share
1 answer

I do not think there is a general solution to this problem. The reason is that

1) the quality of the headphones can be poor, there may be an internal connection between the microphone and the headphones, since the wires are very close in the headphones.

2) Echo canceller in android is optional for all devices. Try to request it and settings first. also the implementation of the echo canceller may vary from device to device

3) latency greatly affects the performance of the echo canceller, as the algorithm must adapt to the delay and buffer a lot of audio.

4) lower versions of android have terrible latency problems, confirmed by Google itself. You might want to upgrade to a higher version of Android, as it has improved a lot.

In general, any API that has some direct access to hardware, such as a microphone and camera, can vary from device to device, and performance cannot be guaranteed.

you can look at openSLES for better sound performance and easier integration into the AEC library if you want to integrate.

Take a look - https://source.android.com/devices/latency_design.html Play low-latency audio on Android https://www.youtube.com/watch?v=d3kfEeMZ65c

Hope this helps,

Regards, Shrish

+1
source

All Articles