Search code examples
androidaudio-recordingresamplingspeexaec

Echo was not cancelling with speex aec in android with higher sample rates?


I successfully integrated speex aec in android (integrated in Android/frameworks/av/media/libeffects/preprocessing).

Echo was cancelling when I use sample rates 8k and 11k for capturing. But it is working worse as I go to higher capturing sample rates such as 16k, 22k, 32k and so on.

I am using speex resampler only to resample my input data. I don't know why the Echo is not cancelling with higher sample rates.

Can anyone explain the solution for this?


Solution

  • Based on your capturing data on 8kHz, the problem are in 2 aspects: (1) The nearend signal has almost no delay (or maybe even a little bit more earlier!) from the farend signal. Add a short delay (for examle 10ms) before near end signal will work. (2) The ERL is more than -12dB. So, you should configure the AEC module to set some kind of configuration item such as "worstExpectedERLdB" bigger than 12dB.