View Source NxAudio.Commons.Windows (nx_audio v0.2.0)

NX Implementation of common window functions.

Summary

Functions

Creates a Hann window of size window_length.

Functions

haan(opts)

Creates a Hann window of size window_length.

Args: window_length: Length of the window. Must be positive integer.
periodic: If true, returns a periodic window for use with FFT. Defaults to true.

Returns: A 1-D tensor of size (window_length,) containing the window

Examples

iex> Hann.create(window_length: 4)
#Nx.Tensor
  f32[4]
  [0.0, 0.5, 0.5, 0.0]
>