[speex-dev] echo cancel

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Thu Feb 26 22:54:39 PST 2004

> I would like to test the echo cancel algorithm available in unstable version
> 1.1.4. This echo canceller can be used with other codecs like G711?

If by "used with other codecs", you mean that you can use the result as
input to any codec you like, the answer is yes.

> Somebody could send me some documentation or sample, or explain the next
> functions:
> SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length);

frame size is the number of samples you want to process at once.
Recommended is in the order of 256 (ideally a power of 2, but other
values will work). filter_length is the approximate length you want your
filter to be. For example, if you want a filter that covers echo up to
100 ms at 8 kHz, you need a filter of length 800.

> void speex_echo_state_destroy(SpeexEchoState *st);

Just frees the stuff allocated by speex_echo_state_init.

> void speex_echo_cancel(SpeexEchoState *st, float *ref, float *echo, float
> *out, float *Y);

ref is the signal you want to clean (usually the signal you record from
your microphone). echo is the echo signal you want to "subtract"
(usually what you're sending to the speakers at the same time you're
recording). out is the (hopefully better) output signal. Y should be set
to NULL until the feature (echo post-filter using the denoiser) works.

Note that the echo canceller is still experimental, it may become
unstable and it lacks a good crosstalk detector.


Jean-Marc Valin, M.Sc.A., ing. jr.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée.
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20040227/d0a9910d/signature-0001.pgp

More information about the Speex-dev mailing list