[pulseaudio-discuss] Testing echo cancellation on an armhf OMAP phone

Neil Jerram neil at ossau.homelinux.net
Wed Dec 19 00:06:17 PST 2012

Arun Raghavan <arun.raghavan at collabora.co.uk> writes:

> On Tue, 2012-12-18 at 06:58 +0200, Tanu Kaskinen wrote:
>> On Mon, 2012-12-17 at 21:49 +0000, Neil Jerram wrote:
>> > Hi pulseaudio folk.  I've been following the list for a while, but this
>> > is my first post...
>> > 
>> > I'm working with PulseAudio on the GTA04 phone, specifically trying to
>> > use it to route the audio during a call, with echo cancellation.
> That's quite interesting!

Thanks!  It's very educational for me, too!

>> > The song is at 44.1 kHz, I think the sound card's default rate is 48
>> > kHz, and it looks from the log as though module-echo-cancel causes the
>> > song to be resampled to 32 kHz (and presumably then back to 48 kHz?).
>> > Is that all expected, and is there any way of reducing this amount of
>> > playback resampling?
> You could try setting the resampler to 'ffmpeg', which is really
> light-weight. speex-fixed-0 might be useful to test as well.

Thanks, I'll remember to try those settings.

>> If you haven't configured the sample rate of module-echo-cancel, then it
>> will default to 32 kHz (I don't know why), which indeed will cause
>> unnecessary resampling just as you described. If the hardware runs at 48
>> kHz, then I think it's best to pass "rate=48000" to module-echo-cancel.
>> I think it would make sense to modify module-echo-cancel to use the rate
>> of the microphone by default...
> Different echo-cancellation algorithms work best at certain sample rates
> (depending on the filters they embed). I've picked the highest viable
> one for each canceller as the default, so setting something higher is
> not a good idea.
> What would make sense is to pick the sample rate that you're getting
> from the GSM sound card, which it seems you're doing already
> (rate=8000)?

Yes, I see that now, and have written/asked more about it in my other

> Also, are you using the webrtc echo canceller or speex?

I've tried both.  As far as I recall there was no significant difference
in the effect on the playback sound (through the ...echo-cancel sink)
that I heard.  I think that makes sense, because distortions of the
playback sound are mostly due to resampling quality and load, not the
echo cancellation algorithm.

I haven't really reached looking at echo cancellation quality yet.  What
would you recommend, for the best combination of quality and low CPU

Thanks again,

More information about the pulseaudio-discuss mailing list