Dan Ellis
: Resources :
Matlab
:
SOLAFS in Matlab
Introduction
One way to stretch or compress speech without the change in pitch that
would result from simply speeding up or slowing down the waveform, is to
delete or duplicate entire pitch cycles - when they can be located.
There is a whole family of algorithms based on Synchronized Overlap-Add
(SOLA) resynthesis. One variant, described in [HejMus91],
finds windows at varying locations in the original sound to align
with a fixed synthesis window rate, matching them within constraints by
cross-correlation.
The SOLAFS algorithm has a lot of options, and the results only sound
good for a small subset of values. To get you started, here's a fragment
showing (relatively) successful use:
»[d,sr]=wavread('sf1_cln.wav');
»sr
sr =
16000
»% Slow down to 3/4 speed with a window of 400 samples, synthesis
windows overlap by 200 points
»y=solafs(d',0.75,400,200);
»% Compare original and resynthesis
»sound(d,16000)
»sound(y,16000)
Notes
2006-04-08: After almost a decade of use in which I had not
noticed anything amiss, Andreas Tsiartas
found a bug that was making small modification factors sound pretty bad.
It is now fixed - thanks, Andreas!
References
- [HejMus91]
- Don Hejna and Bruce R. Musicus, "The SOLAFS Time-Scale Modification Algorithm", BBN Technical Report, July 1991.
A scanned, marked-up copy that is missing page 4 can be found here.
Last updated: $Date: 2003/02/06 18:13:55 $
Dan Ellis <dpwe@ee.columbia.edu>