tfio.audio.inverse_spectrogram
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-02-15 UTC.
[null,null,["Last updated 2022-02-15 UTC."],[],[]]