Re: Spectrogram Inversion Toolbox (Peter Meijer )

Subject: Re: Spectrogram Inversion Toolbox
From:    Peter Meijer  <feedback@xxxxxxxx>
Date:    Tue, 5 Aug 2014 10:02:52 +0200

Hi Malcolm, Thank you for releasing this toolbox which piqued my curiosity. Maybe one or two dependencies were overlooked, or an external dependency (on the Matlab Signal Processing Toolbox) not documented? I got >> TestSpectrogramCode Undefined function 'hamming' for input arguments of type 'double'. Error in ComplexSpectrogram (line 42) h = hamming(windowSize)'; Error in TestSpectrogramCode (line 25) testSignalSpectrogram = ComplexSpectrogram(testSignal, windowSize, frameStep); Thanks! Peter Meijer Seeing with Sound - The vOICe On 04-Aug-14 10:58 PM, Malcolm Slaney wrote: > Iím happy to announce that the Spectrogram Inversion Toolbox is now available. > This is Matlab code that finds a waveform that best fits a given spectrogram. > > You might ask why this is being announced on the auditory mailing list. The > first time I needed this was when I was working on our correlogram inversion > work. Itís also a function included in the NSL (Neural Systems Laboratory) > toolbox from Univ. of Maryland. (Although this new implementation is faster and > better.) And itís useful if you are doing anything like audio morphing. > > The source code is online now at > > > > And more details are below. Enjoy. > > --- Malcolm > > The Spectrogram Inversion Toolbox allows one to create spectrograms > > from audio, and, more importantly, estimate the audio that generates > > any given spectrogram. This is useful because often one wants to > > think about, and modify sounds in the spectrogram domain. > > There are two big problems with spectrogram inversion: most importantly, > > one (generally) drops the phase when computing a spectrogram, and two > > not every (spectrogram) image corresponds to a valid waveform. This > > code finds the waveform that has a magnitude spectrogram most like the > > input spectrogram. > > The easy solution is to just do the inversion assuming some phase (like 0). > > Back in the time domain you get an answer, but there is a lot of > > destructive interference because the segments of adjacent frames do not > > have consistent phase. Some people advocate starting with a random > > phase. > > A better solution to this problem is to use an iterative algorithm > > proposed by Griffin and Lim many decades ago.It does converge, but > > slowly. > > An even better solution is to do the inversion, explicitly looking > > for a good set of phases. This toolbox does that, after the inverse > > Fourier transform of each slice, by finding the best time delay so the > > new frame and the summed frames to now are consistent. This is equivalent > > to starting with some arbitrary linear phase. The effect of this is to > > reduce the reconstruction error by an order of magnitude. Hurray. >

This message came from the mail archive
maintained by:
DAn Ellis <>
Electrical Engineering Dept., Columbia University