[Speex-dev] trouble getting speex_echo_cancel() to work

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Tue May 31 16:04:35 PDT 2005


Hi,

A couple things you may want to check:
- set sampling rate to 8 kHz (at least for now)
- make sure the far end signal in the playback signal is always a bit in
advance (never late) compared to the mic signal.
- Set the tail length to something around 100 ms.

Also, if you're using two different soundcards (as I understand) for the
playback and the capture, you're *never* going to get echo canceller to
work because the playback and capture need to be *exactly* in sync.

	Jean-Marc

Le mardi 31 mai 2005 à 23:38 +0200, Thorvald Natvig a écrit :
> I'm trying to convert my current headphones and microphone chat 
> application to support loudspeakers and microphone, and so I thought I'd 
> give speex_echo_cancel() a try.
> 
> Since my users quite frequently have other sound-producing applications 
> running on their computer (such as winamp), I sample 'wave' recording 
> device of the soundcard in addition to the microphone.
> 
> I then call speex_echo_cancel() as
> 
> speex_echo_cancel(st, data sampled from microphone device, data sampled 
> from output of soundcard, output pointer, y-buffer)
> 
> .. which as I understand it should be correct?
> 
> I've gone to some effort to make sure that the two sets of sampled data 
> are from the exact same time (seems my two soundcards don't sample 32khz 
> at the exact same rate, they differ by about 0.1%), but it doesn't remove 
> any of the echo, it just provides some weird artifacts in addition to the 
> original signal.
> 
> I'm using a framesize of 640, the same as the speex framesize at 32khz 
> uwb, and tested this with speex 1.1.8
> 
> If anyone has some idea on what I'm doing wrong, please let me know :)
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
> 
-- 
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke



More information about the Speex-dev mailing list