[Speex-dev] AEC stops working in 1.2-rc1?

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Mon Aug 11 16:56:32 PDT 2008


OK, sorry I missed that. I'll check again.

	Jean-Marc

Benny Prijono a écrit :
> On Mon, Aug 11, 2008 at 12:34 PM, Jean-Marc Valin
> <jean-marc.valin at usherbrooke.ca <mailto:jean-marc.valin at usherbrooke.ca>>
> wrote:
> 
>     OK, here's what happens. There is indeed a small difference between
>     beta3 and rc1, but the fundamental problem isn't there. I've attached
>     plots of the speaker signal (blue) alongside the mic signal (green). You
>     can see the delay is in the order of 1000 samples. That's way too much
>     to do anything useful because the tail doesn't even "see" the echo. You
>     need to reduce that delay if you want the AEC to work. See the manual.
> 
> 
> 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.
> 
> 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.
> 
> It's easier to understand with testecho perhaps. I did the following
> changes to testecho.c:
> 
>  - changed the frame size and tail length:
>     #define NN 80
>     #define TAIL 1600
>  - apply the delay before entering the "while" loop by adding:
>      {
>          int i;
>          for (i=0; i<10; ++i)
>            fread(ref_buf, sizeof(short), NN, ref_fd);
>      }
> 
> The result, testecho from beta3 can cancel the echo, while the rc1
> version can't.
> 
> I hope I made it clearer this time.
> 
> Thanks
>  Benny
> 


More information about the Speex-dev mailing list