Eugene Leviant
2009-Oct-16 20:47 UTC
[Speex-dev] Please help in understanding Speex echo cancellation
I'm using Speex in Windows VoIP application and trying to implement echo cancellationI'm using waveInXXXX and waveOutXXXX API. I'm doing quite simple thing: After buffer is played (I get MM_WOM_DONE message) I'm just copying it's content to temporary playback buffer After buffer is recorded (I get MM_WIM_DONE message) I call speex_echo_cancellation(state, recorded_buf, playback_buf, out); Access to playback buffer is synchronized, so it is not being read and filled at the same time. I'm using the same soundcard for both recording and playback Speex doesn't seem to cancel any echo at all. My frame size is 20 msec long (640 samples, ultra-wideband), Filter length is 10 frames (6400 samples). I beleive that I correctly initialize the speex echo state (sample rate value is being set in speex_echo_ctl, also speex echo state is registered withing preprocessor state). Please help someone, or at least send a piece of code which works. Any help would be appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20091017/50da0be6/attachment.htm
Keith Kyzivat
2009-Oct-16 21:26 UTC
[Speex-dev] Please help in understanding Speex echo cancellation
WinMM audio interface is not very synchronized, and requires quite a bit of tinkering to get any sort of echo cancellation working with it.Many people on this list have recommended using DirectSound instead. Search through the list archive and you'll see recommendations. On Fri, Oct 16, 2009 at 4:47 PM, Eugene Leviant <evgeny.leviant at gmail.com>wrote:> I'm using Speex in Windows VoIP application and trying to implement echo > cancellationI'm using waveInXXXX and waveOutXXXX API. I'm doing quite > simple thing: > > After buffer is played (I get MM_WOM_DONE message) I'm just copying it's > content to temporary playback buffer > After buffer is recorded (I get MM_WIM_DONE message) I call > speex_echo_cancellation(state, recorded_buf, playback_buf, out); > > Access to playback buffer is synchronized, so it is not being read and > filled at the same time. > I'm using the same soundcard for both recording and playback > > Speex doesn't seem to cancel any echo at all. My frame size is 20 msec long > (640 samples, ultra-wideband), Filter length is > 10 frames (6400 samples). I beleive that I correctly initialize the speex > echo state (sample rate value is being set in speex_echo_ctl, also speex > echo state is registered withing preprocessor state). > > Please help someone, or at least send a piece of code which works. > Any help would be appreciated. > > > > _______________________________________________ > Speex-dev mailing list > Speex-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20091016/6227dde3/attachment.htm