get_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.

  • window (Union[str, Tuple[str, float]]) – The window function applied to the signal before the Fourier transform. Supported window functions: ‘hamming’, ‘hann’, ‘gaussian’, ‘general_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’.


The window represented as a tensor.

Return type



import paddle

n_fft = 512
cosine_window ='cosine', n_fft)

std = 7
gaussian_window ='gaussian',std), n_fft)