[Speex-dev] Echo Cancellation Problem -- with sound sample

Jean-Marc Valin
Sat, 22 Sep 2007 03:23:53 -0000

Try on a real signal (speech or something), not a sinusoid. Cancellation
of sinusoids is both useless and ill-conditioned, and I have made no
attempt on getting that to work (I'm not talking about an occasional
DTMF bit here and there).

	Jean-Marc

Eddy wrote:
> Hello all,
>
> I am trying out the echo cancellation of Speex (1.2beta2) on Windows XP. I
use the Windows Media API (i.e. waveInOpen, waveOutOpen etc) for playback and
capture, but I cannot make echo cancellation works in my use case. Here is a
description of what I tried: (the sound is in 8kHz and 16 bits per sample, the
frame size is 240, tail_length is long enough to cover the far end to near end
delay)
>
>
> Experiment 1:
>
> A sine wave is generated in my test program (each frame has a random
frequency). And the echo cancellation function is called:
>
> speex_echo_cancellation(echo_state, input_frame, echo_frame, output_frame);
>
> where input_frame has a delay of 4560 samples compared to echo_frame (i.e.
570 ms delay). I output the output_frame to Windows Media API and playback in my
speaker. The echo cancellation performs quite well (around 10% noise/echo left).
>
>
>
> Experiment 2:
>
> A sine wave is generated in my test program (each frame has a random
frequency). But different from Experiment 1, I have the sine wave playback in my
speaker and then feedback to my microphone (by placing the microphone nearby the
speaker). echo_frame is the sine wave, and input_frame is the distorted sound
after going through my speaker and microphone.
>
> This time, the echo cancellation is just like it does not exist. The output
from speex_echo_cancellation is "similar" to input_frame
("similar" in term of what I hear).
>
> I have adjusted the delay between echo_frame and input_frame so that the
delay is small. Below is the output from echo_diagnostic.m:
>
> octave-2.9.13.exe:61> echo_diagnostic('aec_rec2.sw',
'aec_play2.sw', 'aec_diagnostic.sw', 1024);
> Far end to near end delay is 203 samples
> Delay looks OK.
> Drift estimate is 0.000000% (0 samples)
> A drift of a few (+-10) samples is normal.
>
>
>
> I do not have any clue to fix this problem now. I am sitting in front of my
computer for 2 days, trying out different things, but still cannot make obvious
improvement on echo cancellation. Is there anyone who have experience on this?
Is there anything I can try? Since I do not know how echo cancellation in Speex
works internally, I afraid there are some assumptions that I missed out.
>
> I have a zip file ( http://idlechain.php0h.com/sound_sw.zip ) containing
ace_rec2.sw and aec_play2.sw in Experiment 2. Possibly it helps finding out the
problem.
>
>
> Thanks,
> Eddy
>
>
>
>
>
>
>       Yahoo! ?????????????????????????http://hk.photos.yahoo.com ????!
>
>
> _______________________________________________
> Speex-dev mailing list
> Speex-dev@xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
>
>