[pulseaudio-discuss] EchoCanceller WebRTC
Arun Raghavan
arun.raghavan at collabora.co.uk
Fri Nov 4 22:19:19 PDT 2011
On Fri, 2011-11-04 at 12:17 +0100, Victor Lenoir wrote:
> Hello,
>
> I would like to try the echo canceller webrtc in pulse audio.
> So I've install pulse audio with the webrtc aec enabled.
> And i've done an alsa configuration file like this :
>
> pcm.pulse { type pulse}
> ctl.pulse { type pulse}
> pcm.!default { type pulse}
> ctl.!default { type pulse}
>
> The first problem is my record device is on the card 1.
> And it seems (when i'm doing parecord and "pactl info" => Default
> Source: alsa_input.0.analog-stereo)
> it records on the sound card 0.
You can select the default device using various GUI tools (your desktop
mixer, possibly, or pavucontrol) or the command line (pacmd).
> The second problem is, is there any option to enabled the echo
> canceller ?
>
> Or I just have to do : paplay random_file.wav & parecord > record
>
> To have a record file without the random_file.wav sound.
To run the canceller automatically in your application, you would use a
recent enough PulseAudio (>= 1.0) and then on your playback/capture call
streams, you would set the property "filter.want" to "echo-cancel" (note
that as was the case in previous versions of PA, you should have the
media role property set to "phone").
module-filter-heuristics and module-filter-apply will automatically load
the canceller module for you. However, at the moment, this will just end
up using the module-echo-cancel default settings, which is the speex
canceller.
There are issues with this approach if you have multiple playback or
capture devices, and I hope to solve these soon.
To have more control over things, you can load the module manually. For
example, to load the webrtc canceller, you'd do something like:
pactl load-module module-echo-cancel aec_method=webrtc
You can also specify what device you want to cancel between here with
the sink_master and source_master module arguments.
If you're using this method, the media role must be set to "phone".
module-intended-roles will then make sure your call streams will get
routed to the appropriate virtual echo-cancelling sink/source.
Now, to test this out, you can use paplay/parec. To make sure these
streams have the appropriate properties, you can set the PULSE_PROP
environment variable appropriately (for example,
PULSE_PROP="media.role='phone'").
Hope this helps,
Arun
More information about the pulseaudio-discuss
mailing list