[Speex-dev] Stream Synchronization for Echo Cancellation

Aymeric Moizard jack at atosc.org
Wed Nov 1 09:28:53 PST 2006

On Thu, 2 Nov 2006, Jean-Marc Valin wrote:

>> In those cases, when you get let's say 1000 packets of 20ms from the mic
>> you may have only 990 packets of 20ms from RTP incoming stream.
>> Thus, before sending outgoing mic/RTP stream, you would wait for 1000
>> incoming packets: where last packet in fact arrive 10*20ms = 200ms
>> after it was supposed to. I have from my experience already seen 4s
>> of clock deviation each minutes between one USB headset and other
>> sound card....
>> In this case, synchronisation is a nightmare. It seems to be similar
>> issue than the one described in your link, but the difference is really
>> unpredictable and the resolution does not seems as simple...
>> Anybody that wish to share experience on this?
> Actually, the jitter buffer in Speex tends to cope relatively well with
> non-synchronised clocks.

Can you explain why?

My problem is not at all related to local input/output non-synchronised 
clocks: my problem is really between non-synchronised clock between one
PC and another...

> The only that that really doesn't like it is the echo canceller.

In my above case, If I add 10 extra packets regularly in the incoming 
stream (the one that miss 10 packets), the echo canceller is working 

I was just trying to comment on the paper you linked to: My opinion is 
that the problem don't only comes from local hardware (where non-synchro 
clocks leads to problem with aec). There are other problems with different
clocks on 2 remote hardware. (where non-synchro does not lead to aec 
issue, but leads to missing data (sometimes no data is played) or too 
much data (the application has to discard else the voice delay is 
growing because a buffer is growing)

The only way would be to extend or reduce frames: so my question was:
does anybody here have ever tried this in real time on audio streaming?
Any simple idea to do this?

I would love to see code on this...
amsip - http://www.antisip.com
osip2 - http://www.osip.org
eXosip2 - http://savannah.nongnu.org/projects/exosip/

More information about the Speex-dev mailing list