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

Eddy eddyc98 at yahoo.com
Sat Sep 22 04:10:19 PDT 2007


Thank you for you quick reply, Jean-Marc.

I have just used a human voice to replace the sine wave, but the result is like a broken voice after tens of seconds. Do you have some sample voice in .sw that I can test with? I want to have one set or a few sets of sample voice that work for my understanding and debugging.

This is the output from echo_diagnostic.m in my human voice test:

Far end to near end delay is 231 samples
Delay looks OK.
Drift estimate is 0.009063% (14 samples)
There may be (not sure) excessive clock drift. Is the capture and playback done on the same soundcard?


Eddy


----- Original Message ----
From: Jean-Marc Valin <jean-marc.valin at usherbrooke.ca>
To: Eddy <eddyc98 at yahoo.com>
Cc: speex-dev at xiph.org
Sent: Saturday, September 22, 2007 6:22:32 PM
Subject: Re: [Speex-dev] Echo Cancellation Problem -- with sound sample

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 at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
> 
> 





      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz


More information about the Speex-dev mailing list