paddleaudio.functional.window

paddleaudio.functional.window.get_window(window: Union[str, Tuple[str, float]], win_length: int, fftbins: bool = True, dtype: str = 'float64') paddle.Tensor[source]

Return a window of a given length and type.

Parameters
  • window (Union[str, Tuple[str, float]]) -- The window function applied to the signal before the Fourier transform. Supported window functions: 'hamming', 'hann', 'kaiser', 'gaussian', 'exponential', 'triang', 'bohman', 'blackman', 'cosine', 'tukey', 'taylor'.

  • win_length (int) -- Number of samples.

  • fftbins (bool, optional) -- If True, create a "periodic" window. Otherwise, create a "symmetric" window, for use in filter design. Defaults to True.

  • dtype (str, optional) -- The data type of the return window. Defaults to 'float64'.

Returns

The window represented as a tensor.

Return type

Tensor