tf.signal.stft
    
    
      
    
    
      
      Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
Computes the Short-time Fourier Transform of signals.
tf.signal.stft(
    signals,
    frame_length,
    frame_step,
    fft_length=None,
    window_fn=tf.signal.hann_window,
    pad_end=False,
    name=None
)
Used in the notebooks
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. | 
| frame_step | An integer scalar Tensor. The number of samples to step. | 
| fft_length | An integer scalar Tensor. The size of the FFT to apply.
If not provided, uses the smallest power of 2 enclosingframe_length. | 
| window_fn | A callable that takes a window length and a dtypekeyword
argument and returns a[window_length]Tensorof samples in the
provided datatype. If set toNone, no windowing is used. | 
| 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. | 
| name | An optional name for the operation. | 
| Returns | 
|---|
| A [..., frames, fft_unique_bins]Tensorofcomplex64/complex128STFT values wherefft_unique_binsisfft_length // 2 + 1(the unique
components of the FFT). | 
| Raises | 
|---|
| ValueError | If signalsis not at least rank 1,frame_lengthis
not scalar, orframe_stepis not scalar. | 
  
  
 
  
    
    
      
       
    
    
  
  
  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 2024-04-26 UTC.
  
  
  
    
      [null,null,["Last updated 2024-04-26 UTC."],[],[]]