[pulseaudio-discuss] Test and Evaluate Echo Cancellation in an Embedded Device

Arun Raghavan arun at arunraghavan.net
Wed May 18 03:45:06 UTC 2016


Hi Caio,

On Sat, 14 May 2016, at 02:19 AM, Caio wrote:
> Arun,
> 
> Your test works very well! tks!
> When I listen the cancelled.wav The audio start very low and after the
> voice is very very low and some times disapers, now it's time to fix the
> mechanical part (speaker / mic) and mic volume.

The AGC should kick in and fix that eventually.

> The audio is cracking , but I think there's some problem in my
> configuration (I will need help to fix it).
> 
> 
> The log.
> 
> Jan 01 02:52:43 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> wm8962-0] module-echo-cancel.c: Doing resync
> Jan 01 02:52:43 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> wm8962-0] module-echo-cancel.c: Playback after capture (-1638515), drop
> sink 104884
> Jan 01 02:52:43 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> wm8962-0] module-echo-cancel.c: Playback too far ahead (146059), drop
> source 9346
> Jan 01 02:52:44 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> wm8962-0] module-echo-cancel.c: Playback too far ahead (13025), drop
> source
> 832
> Jan 01 02:52:45 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> wm8962-0] module-echo-cancel.c: Playback too far ahead (10100), drop
> source
> 646
> Jan 01 02:52:46 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> wm8962-0] module-echo-cancel.c: Playback too far ahead (9965), drop
> source
> 636
> Jan 01 02:52:47 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> wm8962-0] module-echo-cancel.c: Playback too far ahead (10089), drop
> source
> 644
> Jan 01 02:52:48 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> wm8962-0] module-echo-cancel.c: Playback too far ahead (10024), drop
> source
> 640
> Jan 01 02:52:49 colibri-imx6-jfl pulseaudio[1051]: E: [alsa-source-HiFi
> wm8962-0] module-echo-cancel.c: Playback after capture (-34), drop sink
> 22
> 
> 
> This variable   PULSE_PROP="filter.want=echo-cancel"   fixed the problem.
> When I was testing just like I wrote I had problems with echo.

I'm not sure I follow correctly -- you're saying that if you do things
this way, the AEC works fine?

> pactl load-module module-echo-cancel source_name=echosource
> sink_name=echosink aec_method=webrtc sink_master=mastersink
> source_master=mastersource
> gst-launch-1.0 filesrc location=some-voice-file.wav ! wavparse !
>   pulsesink device="echosink" \
>                        pulsesrc  device="echosource" ! wavenc ! filesink

Can you confirm that the streams were actually connected to those
devices? Look at the output of pactl list sink-inputs and pactl list
source-outputs.

> How I can configure webrtc or speex using enviroment vars (PULSE_PROP)?

You can't configure this via the environment. With filter.want, the
default which is compiled in is used (webrtc if we have it, else speex).
You can only control this if you manually load the module as you ahve
above.

-- Arun


More information about the pulseaudio-discuss mailing list