[linux-audio-user] Stretching with very high accuracy

From: Alex Polite <notmyprivateemail@email-addr-hidden>
Date: Thu Jun 08 2006 - 18:39:48 EEST

Hi there.

I'm developing a little tool to automatically sync two audio
recordings of the same event made with two different recorders. I've
got the algorithms worked out and can correctly compute the drift and
offset between the files in my test recording. The next step is to
pad, stretch and mix the two files into one perfectly synced stereo

The drift is very small. In my test recording the drift is only 53
milliseconds over the course of an hour. My stretch factor is

I've tried to stretch the file with sox:

sox infile.wav outfile.wav stretch 0.99998525762821

When I try to line up the files in a ardour I realise that the stretch
sox makes is hugely inaccurate.
For testing purposes I tried to stretch an hourly long file (44.1kHz)
by some 2000 samples, but the resulting file was some 30000 samples
longer. The stretch was off by more than 0.5 seconds!

Is there anything I can do to increase the accuracy of sox? Is there
any other tool out there that will do a better job at stretching with
very high accuracy?


Alex Polite
http://flosspick.org - finding the right open source
Received on Fri Jun 9 00:15:02 2006

This archive was generated by hypermail 2.1.8 : Fri Jun 09 2006 - 00:15:02 EEST