This is where navigation should be.

GLA - Griffin-Lim Algorithm

Usage

c = gla(s,g,a,M)
c = gla(s,g,a,M,maxit)
c = gla(s,g,a,M,maxit,tol)
[c,f,relres,iter] = gla(...)

Input parameters

s Initial coefficients.
g Analysis Gabor window
a Hop factor
M Number of channels
maxit Maximum number of iterations.
tol relative tolerance

Output parameters

c Coefficients with the reconstructed phase
f Reconstructed signal.
relres Vector of residuals.
iter Number of iterations done.

Description

gla(s,g,a,M) attempts to find coefficients c from their abs. value:

c = dgtreal(f,g,a,M,'timeinv');
s = abs(c);

using the Griffin-Lim algorithm.

[c,f,relres,iter]=gla(...) additionally returns an array of residuals relres, the number of iterations done iter and the coefficients c with the reconstructed phase. The relationship between f and c is:

f = idgtreal(c,gd,a,M,'timeinv')

where gd is the canonical dual window obtained by gabdual.

Initial phase guess

'input' Choose the starting phase as the phase of the input s. This is the default
'zero' Choose a starting phase of zero.
'rand' Choose a random starting phase.

Enforcing prior information

'coefmod',coefmod Anonymous function in a form coefmod = @(c) ...; altering coefficients in each iteration after the phase update has been done. This is usefull when e.g. phase of some of the coefficients is known.
'timemod',timemod Anonymous function in a form timemod = @(f) ...; altering the time-domain signal in each iteration. This is usefull when e.g. the time support of the signal is known. Note that numel(f)= size(s,2)*a.

Algorithm acceleration

'gla' The original Giffin-Lim iteration scheme. This is the default.
'fgla' A fast Griffin-Lim iteration scheme from Perraudin et. al..
'alpha',a Parameter of the Fast Griffin-Lim algorithm. It is ignored if not used together with 'fgla' flag.

Additional parameters

'maxit',n Do at most n iterations.
'tol',t Stop if relative residual error is less than the specified tolerance.
'Ls',Ls Crop the reconstructed signal f to length Ls.
'print' Display the progress. This is disabled by default.
'printstep',p If 'print' is specified, then print every p'th iteration. Default value is p=10;

References:

D. Griffin and J. Lim. Signal estimation from modified short-time Fourier transform. Acoustics, Speech and Signal Processing, IEEE Transactions on, 32(2):236--243, Apr 1984. [ DOI ]

N. Perraudin, P. Balazs, and P. Søndergaard. A fast Griffin-Lim algorithm. In Applications of Signal Processing to Audio and Acoustics (WASPAA), IEEE Workshop on, pages 1--4, Oct 2013. [ DOI ]