[Speex-dev] AEC and resample question
jean-marc.valin at usherbrooke.ca
Thu Feb 8 14:35:26 PST 2007
Jerry Trantow a écrit :
> I understand that the capture/playback signals need to be sync'd for an AEC
> to adapt. I'm a little bit confused on the requirements of synchronous
> sampling between the near end (mic/speaker) and the far end (phone line). I
> have an embedded DSP system with mic and speaker getting 1msec packets
> containing 8 samples. We can watch the DSP and ISDN clock frames drift and
> every few minutes we will drop or reuse a packet of samples.
The only requirement for sync is between the near-end capture and
playback. outside of that, you can do pretty much whatever you like.
> According to "Echo Cancellation Demystified" by Alexey Frunze
> http://www.spiritdsp.com/pdf/article_4.pdf (see section "Incorrect Codec
> Synchronization") dropping or reusing samples isn't a viable solution since
> it abruptly changes the echo path delay. If I am dropping/reusing far end
> (phone line/ISDN) samples before they go out the speaker and after the mic,
> I don't understand why this has anything to do with the echo path.
> The solution in the paper is to put an adaptive SRC between the phone codec
> and mic/speaker codec.
All of that is only about differences between the capture and playback
> This must be a common situation. I'm curious how people are implementing
> speex and the AEC? Is there any benefit to resample? Is the speex resample
> code suitable for adjusting the sample rates that only differ by clock
> crystal tolerances?
The resampler I have is actually designed to be able to do that type of
this. But in your case it's overkill, just keep on discarding samples
(or better, doing a bit of smoothing) and you should be fine.
Sorry about the confusion.
More information about the Speex-dev