fft_frequencies

paddle.audio.functional. fft_frequencies ( sr: int, n_fft: int, dtype: str = 'float32' ) paddle.Tensor [source]

Compute fourier frequencies.

Parameters
  • sr (int) – Sample rate.

  • n_fft (int) – Number of fft bins.

  • dtype (str, optional) – The data type of the return frequencies. Defaults to ‘float32’.

Returns

FFT frequencies in Hz with shape (n_fft//2 + 1,).

Return type

Tensor

Examples

>>> import paddle

>>> sr = 16000
>>> n_fft = 128
>>> fft_freq = paddle.audio.functional.fft_frequencies(sr, n_fft)