Computes the Short-time Fourier Transform of signals.

Used in the notebooks

Used in the tutorials

Implemented with TPU/GPU-compatible ops and supports gradients.

signals A [..., samples] float32/float64 Tensor of 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 enclosing frame_length.
window_fn A callable that takes a window length and a dtype keyword argument and returns a [window_length] Tensor of samples in the provided datatype. If set to None, no windowing is used.