# tfio.audio.inverse_spectrogram

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/io/blob/v0.24.0/tensorflow_io/python/ops/audio_ops.py#L52-L102) |

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,"

<br />

<br />

<br />

| ## 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`) |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| An 1-D waveform audio tensor. ||

<br />