Generate audio waveform from spectrogram using Griffin-Lim algorithm.
tfio.audio.inverse_spectrogram(
spectrogram, nfft, window, stride, iterations=30
)
This is an adaptation of the method introduced in
D. Griffin and Jae Lim, "Signal estimation from modified
short-time Fourier transform,"
Args |
spectrogram
|
A spectrogram with shape (None, nfft // 2 + 1).
The first dimension depends on window and stride.
The second contains half of the absolute values
of the Fourier transforms because the FFT of a real
signal is symmetrical.
|
nfft
|
Size of FFT.
|
window
|
Size of window.
|
stride
|
Size of hops between windows.
|
iterations
|
number of Griffin-Lim iterations.
Change this to higher values if the reconstructed phase
is not appropriate (i.e., the audio is coming out
echoed or otherwise weird )
|
Returns |
An 1-D waveform audio tensor.
|