[Speex-dev] AEC and resample question

Jim Crichton jim.crichton at comcast.net
Thu Feb 8 13:27:28 PST 2007


Jerry,

Looking at the paper that you referenced (which I have seen before), the 
example shows an AEC on the microphone/speaker side and an LEC on the 
ISDN/PSTN side, and an Adaptive Interpolator in the middle.  The add/drop 
sample approach is just a simple adaptive interpolator, and, as you say, it 
has nothing to do with the echo path delay.

As long as you are behind the AEC/microphone/speaker combination, it seems 
like dropping or repeating samples should not affect the echo canceller at 
all.  However, you are introducing phase jumps in the audio, and maybe that 
disrupts the frequency-domain echo canceller that Speex is using.

Cutting and pasting speech files would create similar phase jumps. 
Jean-Marc, would you expect this to give the echo canceller any trouble?

If this is really an issue, instead of adaptive resampling, you could try to 
make the changes when the energy is low.  But the decision logic might not 
be any simpler than the resampler.

- Jim


----- Original Message ----- 
From: "Jerry Trantow" <jtrantow at ieee.org>
To: <speex-dev at xiph.org>
Sent: Thursday, February 08, 2007 1:08 PM
Subject: [Speex-dev] AEC and resample question


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.

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.

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?


_______________________________________________
Speex-dev mailing list
Speex-dev at xiph.org
http://lists.xiph.org/mailman/listinfo/speex-dev




More information about the Speex-dev mailing list