code: def griffin_lim(
      spc, n_fft, n_shift, win_length, window="hann", n_iters=100
  ):
      """Convert linear spectrogram into waveform using Griffin-Lim.
  
      Args:
          spc (ndarray): Linear spectrogram (T, n_fft // 2 + 1).
          n_fft (int): Number of FFT points.
          n_shift (int): Shift size in points.
          win_length (int): Window length in points.
          window (str, optional): Window function type.
          n_iters (int, optionl): Number of iterations of Griffin-Lim Algorithm.
  
      Returns:
          ndarray: Reconstructed waveform (N,).
  
      """
      # assert the size of input linear spectrogram
      assert spc.shape[1] == n_fft // 2 + 1
  
      if V(librosa.__version__) >= V("0.7.0"):
          # use librosa's fast Grriffin-Lim algorithm
          spc = np.abs(spc.T)
          y = librosa.griffinlim(
              S=spc,
              n_iter=n_iters,
              hop_length=n_shift,
              win_length=win_length,
              window=window,
              center=True if spc.shape[1] > 1 else False,
          )
      else:
          # use slower version of Grriffin-Lim algorithm
          logging.warning(
              "librosa version is old. use slow version of Grriffin-Lim algorithm."
              "if you want to use fast Griffin-Lim, please update librosa via "
              "`source ./path.sh && pip install librosa==0.7.0`."
          )
          cspc = np.abs(spc).astype(np.complex).T
          angles = np.exp(2j * np.pi * np.random.rand(*cspc.shape))
          y = librosa.istft(
              cspc * angles, n_shift, win_length, window=window
          )
          for i in range(n_iters):
              angles = np.exp(
                  1j
                  * np.angle(
                      librosa.stft(
                          y, n_fft, n_shift, win_length, window=window
                      )
                  )
              )
              y = librosa.istft(
                  cspc * angles, n_shift, win_length, window=window
              )
  
      return y
  
file_path: espnet/utils/convert_fbank_to_wav.py
imports: import argparse
  import logging
  import os
  import librosa
  import numpy
  from packaging.version import parse
  from scipy.io.wavfile import write
  from espnet.utils.cli_readers import file_reader_helper
  from espnet.utils.cli_utils import get_commandline_args
label_desc: Use image node_id 2 for calling a global function with example usage: griffin_lim(spc, n_fft, n_shift, win_length, window, n_iters) and returns: y