class_docstr: Helper functions to compute specgrams.
class_docstr_tok: ["Helper","functions","to","compute","specgrams","."]
docstr: Convert from complex stfts to waves.
  
  Args:
    stfts: Complex64 tensor of stft, shape [batch, time, freq, 1].
  
  Returns:
    waves: Tensor of the waveform, shape [batch, time, 1].
docstr_tok: ["Convert","from","complex","stfts","to","waves",".","Args",":","stfts",":","Complex64","tensor","of","stft",",","shape","[","batch",",","time",",","freq",",","1","]",".","Returns",":","waves",":","Tensor","of","the","waveform",",","shape","[","batch",",","time",",","1","]","."]
code: def stfts_to_waves(self, stfts):
      """Convert from complex stfts to waves.
  
      Args:
        stfts: Complex64 tensor of stft, shape [batch, time, freq, 1].
  
      Returns:
        waves: Tensor of the waveform, shape [batch, time, 1].
      """
      dc = 1 if self._discard_dc else 0
      nyq = 1 - dc
      stfts = tf.pad(stfts, [[0, 0], [0, 0], [dc, nyq], [0, 0]])
      waves_resyn = tf.signal.inverse_stft(
          stfts=stfts[:, :, :, 0],
          frame_length=self._nfft,
          frame_step=self._nhop,
          fft_length=self._nfft,
          window_fn=tf.signal.inverse_stft_window_fn(
              frame_step=self._nhop
          ),
      )[:, :, tf.newaxis]
      # Python does not allow rslice of -0
      if self._pad_r == 0:
          return waves_resyn[:, self._pad_l :]
      else:
          return waves_resyn[:, self._pad_l : -self._pad_r]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from magenta.models.gansynth.lib import spectral_ops
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 6 for calling the SpecgramsHelper obj's underlying member method code with example usage: obj.stfts_to_waves(stfts) and returns: waves_resyn, waves_resyn