[pulseaudio-discuss] Echo cancellation settings.

Tanu Kaskinen tanuk at iki.fi
Tue Apr 2 08:35:29 PDT 2013


On Tue, 2013-04-02 at 02:07 -0700, Lazar Doru wrote:
> Hi there!
> 
> I am a phone app developer trying to achieve the following tasks using
> PulseAudio:
> 
> 1. Allow the user to select the source/sink devices to use (from the
> application).
> 
> 2. Cancel the echo from the selected devices.
> 
> I am setting the media.role to "phone" and the filter.want property
> to "echo-cancel" for both streams 
> and echo cancel is successfully loaded and it works with
> the mention that webrtc cuts a lot of
> "good noise" so that the users are having a hard time understanding
> each other.
> 
> I tried manually loading the Speex echo canceler
> using pa_context_load_module (and it works great)
>  but i don't think that is an option for me because devices that are
> plugged-in after the echo-cancel 
> module being loaded don't have their echo-cancelled equivalent loaded
> (at least they are not shown in pasystray). 
> Therefore I have the following question:
> 
> Can I / How can I specify per application which aec_method to use
> without loading the echo cancel-module?

I'm not an expert on the "filter.want" functionality, but I don't think
it's possible to specify module-echo-cancel arguments when you use the
automatic filter loading.

If you already have code for loading module-echo-cancel manually with
parameters that you're happy with, it shouldn't be very hard to extend
that so that you do the loading separately for each device that you want
to use, hot-plugged or not.

Managing module-echo-cancel instances from applications isn't
recommendable in general. Using the "filter.want" property should be all
that phone apps need to do to get good echo canceling. But if that isn't
good enough, and you're able to get better results with manually
configured and managed module-echo-cancel instances, it seems sensible
to go against the recommendations. This is a bug in PulseAudio, but I
don't know how to fix it.

-- 
Tanu



More information about the pulseaudio-discuss mailing list