danflu at uninet.com.br
2009-Mar-04 21:15 UTC
[Speex-dev] echo cancellation input/output delay
Hi, I've been reading the speex echo cancellation documentation and it says : ".... It is important that, at any time, any echo that is present in the input has already been sent to the echo canceller as echo_frame. ... "; All I'm doing in the echo cancellation process is initializing it once with a call to : SpeexEchoState* speex_echo_state_init(int frame_size, int filter_length) and calling speex_echo_cancellation(m_echoState, rec, play, out) to remove the far-end echo from the input signal. So here is my question: if the first sample in the rec buffer refers to a guiven time 't' the first sample in the play buffer is supposed to refer to a guiven time 't - delta' ??? or in other words: speex_echo_cancellation(m_echoState, rec(t), play(t-delta), out) is correct ? If so... how many millisencons this 'delta' is supposed to be ? Thanks in advance, Daniel
Quoting danflu at uninet.com.br:> speex_echo_cancellation(m_echoState, rec(t), play(t-delta), > out) is correct ?Yes and no. If your audio buffering has no delay, then having a positive delta means the AEC won't see play(t) when it needs to cancel at rec(t), which is bad. On the other hand, most audio hardware introduces a lot of delay, so including your delta manes that you reduce that delay, which is OK. As long as delta is never bigger than the audio delay (OS/hardware-specific). Jean-Marc> If so... how many millisencons this 'delta' is supposed to > be ? > > Thanks in advance, > Daniel > _______________________________________________ > Speex-dev mailing list > Speex-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev > >