(self, specgrams)
return spectral_ops.polar2rect(mag, phase_angle)[:, :, :, tf.newaxis]
Converts specgrams to stfts.

    Args:
      specgrams: Tensor of log magnitudes and instantaneous frequencies,
        shape [batch, time, freq, 2].

    Returns:
      stfts: Complex64 tensor of stft, shape [batch, time, freq, 1].
Converts specgrams to stfts.
Converts specgrams to stfts .
def specgrams_to_stfts(self, specgrams):
    """Converts specgrams to stfts.

    Args:
      specgrams: Tensor of log magnitudes and instantaneous frequencies,
        shape [batch, time, freq, 2].

    Returns:
      stfts: Complex64 tensor of stft, shape [batch, time, freq, 1].
    """
    logmag = specgrams[:, :, :, 0]
    p = specgrams[:, :, :, 1]

    mag = tf.exp(logmag)

    if self._ifreq:
      phase_angle = tf.cumsum(p * np.pi, axis=-2)
    else:
      phase_angle = p * np.pi

    return spectral_ops.polar2rect(mag, phase_angle)[:, :, :, tf.newaxis]
def specgrams_to_stfts ( self , specgrams ) : logmag = specgrams [ : , : , : , 0 ] p = specgrams [ : , : , : , 1 ] mag = tf . exp ( logmag ) if self . _ifreq : phase_angle = tf . cumsum ( p * np . pi , axis = - 2 ) else : phase_angle = p * np . pi return spectral_ops . polar2rect ( mag , phase_angle ) [ : , : , : , tf . newaxis ]