(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].
Convert from complex stfts to waves.
Convert from complex stfts to waves .
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]
def stfts_to_waves ( self , stfts ) : 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 ]