Computes the inverse modified DCT of mdcts.
tf.signal.inverse_mdct(
    mdcts,
    window_fn=tf.signal.vorbis_window,
    norm=None,
    name=None
)
To reconstruct an original waveform, the same window function should
be used with mdct and inverse_mdct.
Example usage:
@tf.function
def compare_round_trip():
  samples = 1000
  frame_length = 400
  halflen = frame_length // 2
  waveform = tf.random.normal(dtype=tf.float32, shape=[samples])
  waveform_pad = tf.pad(waveform, [[halflen, 0],])
  mdct = tf.signal.mdct(waveform_pad, frame_length, pad_end=True,
                        window_fn=tf.signal.vorbis_window)
  inverse_mdct = tf.signal.inverse_mdct(mdct,
                                        window_fn=tf.signal.vorbis_window)
  inverse_mdct = inverse_mdct[halflen: halflen + samples]
  return waveform, inverse_mdct
waveform, inverse_mdct = compare_round_trip()
np.allclose(waveform.numpy(), inverse_mdct.numpy(), rtol=1e-3, atol=1e-4)
True
Implemented with TPU/GPU-compatible ops and supports gradients.
| Args | 
|---|
| mdcts | A float32/float64[..., frames, frame_length // 2]Tensorof MDCT bins representing a batch offrame_length // 2-point
MDCTs. | 
| window_fn | A callable that takes a frame_length and a dtypekeyword
argument and returns a[frame_length]Tensorof samples in the
provided datatype. If set toNone, a rectangular window with a scale of
1/sqrt(2) is used. For perfect reconstruction of a signal frommdctfollowed byinverse_mdct, please usetf.signal.vorbis_window,tf.signal.kaiser_bessel_derived_windoworNone. If using another
window function, make sure that w[n]^2 + w[n + frame_length // 2]^2 = 1
and w[n] = w[frame_length - n - 1] for n = 0,...,frame_length // 2 - 1 to
achieve perfect reconstruction. | 
| norm | If "ortho", orthonormal inverse DCT4 is performed, if it is None,
a regular dct4 followed by scaling of 1/frame_lengthis performed. | 
| name | An optional name for the operation. | 
| Returns | 
|---|
| A [..., samples]Tensoroffloat32/float64signals representing
the inverse MDCT for each input MDCT inmdctswheresamplesis(frames - 1) * (frame_length // 2) + frame_length. | 
| Raises | 
|---|
| ValueError | If mdctsis not at least rank 2. |