Bug 58226 - echo cancellation is poor with pulseaudio
Summary: echo cancellation is poor with pulseaudio
Status: RESOLVED WORKSFORME
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
: 58224 58225 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-13 06:35 UTC by venu
Modified: 2016-04-14 16:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description venu 2012-12-13 06:35:46 UTC
Hi all,
I am using pulseaudio-2.0 with webrtc enabled on ubuntu 64 bit X86 platform.

When i run gstreamer pipeline gst-launch-0.10 pulsesrc ! pulsesink  i am getting more echo.


These are the lines i added in default.pa for echo cancellation


load-module module-alsa-sink device=hw:1,3 sink_name=output
load-module module-alsa-source device=hw:2,0 source_name=input

load-module module-echo-cancel  aec_method=webrtc

set-default-source input.echo-cancel
set-default-sink output.echo-cancel


Is there any wrong with my default.pa or i have to add any other settings in default.pa for proper echo cancellation .



Thanks,
Venu.
Comment 1 Arun Raghavan 2012-12-13 06:37:51 UTC
*** Bug 58224 has been marked as a duplicate of this bug. ***
Comment 2 Arun Raghavan 2012-12-13 06:43:14 UTC
Are you trying to use the echo canceller in a specific application? Some pre-existing applications (notably Empathy) will set up the required parameters for you, and it should just work on your voip calls via that program.

If you're writing your own application, the recommended way to use echo cancellation is to _not_ load module-echo-cancel yourself. Instead, set the 'filter.want' property to 'echo-cancel' on your call streams, and things should just work.
Comment 3 venu 2012-12-13 06:47:40 UTC
Hi Arun,

I am using gstreamer pulseaudio .

 _not_ load module-echo-cancel means i have to remove that line from default.pa.

Where to add 'filter.want' option , In gstreamer or some where in pulse audio echo cancellation module.

Thanks,
Venu.
Comment 4 Arun Raghavan 2012-12-13 08:24:25 UTC
(In reply to comment #3)
> Hi Arun,
> 
> I am using gstreamer pulseaudio .

Do you mean that you are using GStreamer and PulseAudio in some application that you are writing?

>  _not_ load module-echo-cancel means i have to remove that line from
> default.pa.

Yes, exactly.

> Where to add 'filter.want' option , In gstreamer or some where in pulse
> audio echo cancellation module.

You can set properties on the stream using GStreamer properties on the pulsesrc and pulsesink elements (assuming you're writing your own app). Take a look at the 'stream-properties' property on these elements.
Comment 5 venu 2012-12-13 09:49:46 UTC
Hi Arun,

Thanks for your reply.

I enabled "PULSE_PROP_media.role=phone"  and "PULSE_PROP_filter.want=echo-cancel"
in both sink and source of gstreamer application .The time when i run gstreamer pipeline the echo-cancellation module is getting loading but still i am getting echo.Is there any other i have to pass to pulse audio to webrtc



Thanks,
Venu
Comment 6 Arun Raghavan 2013-07-01 16:33:42 UTC
*** Bug 58225 has been marked as a duplicate of this bug. ***
Comment 7 Puyol 2014-05-28 21:06:59 UTC
(In reply to comment #6)
> *** Bug 58225 has been marked as a duplicate of this bug. ***

Hello, i didn't understand how to use pulseaudio in gstreamer to cancel echo, where i have to put this proprietes and is there something that i have to modify in my code of voip apps, in fact i use the example of rtp in gstreamer to make my apps! thanks
Comment 8 Nicolas Dufresne 2016-04-14 16:01:53 UTC
Not sure it's worth keeping this bug open. This works perfectly well these days:

gst-launch-1.0 pulsesrc stream-properties=props,filter.want=echo-cancel ! pulsesink stream-properties=props,want=echo-cancel
Comment 9 Arun Raghavan 2016-04-14 16:08:14 UTC
Good point. If there are issues, please file a bug with spcific steps to reproduce the problem and I'm happy to investigate.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.