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@usherbrooke.ca>
To: Eddy <eddyc98@yahoo.com>
Cc: speex-dev@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@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
Mihai Balea
2007-Sep-23 06:33 UTC
[Speex-dev] Echo Cancellation Problem -- with sound sample
On Sep 22, 2007, at 7:10 AM, Eddy wrote:> 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, I'm evaluating echo cancellation in 1.2beta2 myself and I got pretty decent results. A couple of things to keep in mind: - if there's clock drift between your output and input devices, then EC will not work properly. - you might want to link EC with the preprocessor, so you eliminate residual echo as well... In my tests I have a wave file containing speech played back on my speakers. My test app then records whatever comes in from the microphone and applies speex_echo_cancellation and then speex_preprocess_run. The resulting sound is saved in another wave file. I am getting pretty good results with this setup, with echo being almost completely eliminated. Mihai -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2411 bytes Desc: not available Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20070923/f38c1fa7/smime.bin