echo-cancel: Add speex preprocessing
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 19 May 2011 07:59:49 +0000 (13:29 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 24 May 2011 08:21:28 +0000 (13:51 +0530)
commit0ecf51119a349e51daeea0437eba9a14d69ce533
tree840f50cdfdbcd4ddf8126f2eb4dec40e875a2319
parent117c7145944fb227703d72dd2f03e88d439c187d
echo-cancel: Add speex preprocessing

This allows the selective enabling of speex' preprocessing algorithms
before running the echo-canceller -- for now this includes automatic
gain control, noise suppression and echo suppression. It's all off by
default for now, though at some point in the near future we might want
to enable at least denoising by default.

The denoising works pretty well, though we might want to add a way to
tweak the noise-suppression knob that libspeex provides.

The AGC option is just a stop-gap -- we need a real AGC mechanism that
tweaks the source volume rather than doing this in software.

The speex documentation mentions VAD and dereverb, but it appears that
these are not complete yet.

We don't do all this in a separate module from module-echo-cancel to
avoid the overhead of adding another virtual source. It makes more sense
to make a separate virtual source module that can be used for cases
where preprocessing is useful but AEC is not (for e.g. noise suppression
for fan noise in a recording application).

Another reason to keep this integrated with the AEC module is that the
echo suppression bits use the speex echo canceller state. This does leak
some information about the AEC implementation into module-echo-cancel,
but this is unavoidable.
src/modules/echo-cancel/echo-cancel.h
src/modules/echo-cancel/module-echo-cancel.c