tf.signal.mdct
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
Computes the Modified Discrete Cosine Transform of signals.
tf.signal.mdct(
    signals,
    frame_length,
    window_fn=tf.signal.vorbis_window,
    pad_end=False,
    norm=None,
    name=None
)
Implemented with TPU/GPU-compatible ops and supports gradients.
| Args | 
|---|
| signals | A [..., samples]float32/float64Tensorof real-valued
signals. | 
| frame_length | An integer scalar Tensor. The window length in samples
which must be divisible by 4. | 
| 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. | 
| pad_end | Whether to pad the end of signalswith zeros when the provided
frame length and step produces a frame that lies partially past its end. | 
| norm | If it is None, unnormalized dct4 is used, if it is "ortho"
orthonormal dct4 is used. | 
| name | An optional name for the operation. | 
| Returns | 
|---|
| A [..., frames, frame_length // 2]Tensoroffloat32/float64MDCT values whereframesis roughlysamples // (frame_length // 2)whenpad_end=False. | 
| Raises | 
|---|
| ValueError | If signalsis not at least rank 1,frame_lengthis
not scalar, orframe_lengthis not a multiple of4. | 
  
  
 
  
    
    
      
       
    
    
  
  
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
  Last updated 2023-10-06 UTC.
  
  
  
    
      [null,null,["Last updated 2023-10-06 UTC."],[],[]]