<div dir="ltr">On Mon, Aug 11, 2008 at 12:34 PM, Jean-Marc Valin <span dir="ltr"><<a href="mailto:jean-marc.valin@usherbrooke.ca" target="_blank">jean-marc.valin@usherbrooke.ca</a>></span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
OK, here's what happens. There is indeed a small difference between<br>
beta3 and rc1, but the fundamental problem isn't there. I've attached<br>
plots of the speaker signal (blue) alongside the mic signal (green). You<br>
can see the delay is in the order of 1000 samples. That's way too much<br>
to do anything useful because the tail doesn't even "see" the echo. You<br>
need to reduce that delay if you want the AEC to work. See the manual.<br>
<br>
</blockquote><div><br>Sorry I don't get you. I can make sense of that *if* you're talking about testecho sample application, since in testecho the tail is set to 1024 samples.<br><br>But, as I explained, I used my test program for producing the result, and there I set the tail length to 200ms (1600 samples). *And*, in addition to that, I delay the frames that's fed to speex_echo_cancellation() by 100ms, to reflect the playback/recording delay when the mic.pcm file was recorded. This means, if I play the frame now, I will give it to speec_echo_cancellation() 100ms later (similar to your PLAYBACK_DELAY in mdf.c). So this is equal to shifting the blue signal in your graph to the right by 100ms.<br>
<br>It's easier to understand with testecho perhaps. I did the following changes to testecho.c:<br><br> - changed the frame size and tail length:<br> #define NN 80<br> #define TAIL 1600<br> - apply the delay before entering the "while" loop by adding:<br>
{<br> int i;<br> for (i=0; i<10; ++i)<br> fread(ref_buf, sizeof(short), NN, ref_fd);<br> }<br><br>The result, testecho from beta3 can cancel the echo, while the rc1 version can't. <br>
<br></div></div>I hope I made it clearer this time.<br><br>Thanks<br> Benny<br><br></div>