NxAudio.Transforms.SpectrogramConfig (nx_audio v0.3.1)
View SourceConfiguration options for spectrogram transformation.
Summary
Types
:n_fft(non_neg_integer/0) - Size of FFT, creates n_fft // 2 + 1 bins. The default value is400.
Functions
Parses and validate a keyword list into a valid spectrogram config
Types
@type t() :: [ n_fft: non_neg_integer(), win_length: non_neg_integer(), hop_length: non_neg_integer(), pad: non_neg_integer(), window_fn: term(), power: float(), normalized: term(), wkwargs: keyword(), center: boolean(), pad_mode: atom(), onesided: boolean() ]
:n_fft(non_neg_integer/0) - Size of FFT, creates n_fft // 2 + 1 bins. The default value is400.:win_length(non_neg_integer/0) - Number of samples in each frame. By default its half of the n_fft:hop_length(non_neg_integer/0) - Number of samples between successive frames., By default its half of the n_fft:pad(non_neg_integer/0) - Two sided padding of signal. The default value is0.:window_fn(term/0) - Window function to apply to each frame. The default value is&NxAudio.Commons.Windows.haan/1.:power(float/0) - Exponent for the magnitude spectrogram, (must be > 0) e.g., 1 for magnitude, 2 for power, etc. If None, then the complex spectrum is returned instead. The default value is2.:normalized- Whether to normalize by magnitude after stft. choices are "window" and "frame_length", if specific normalization type is desirable.:wkwargs(keyword/0) - Arguments for window function. The default value is[].:center(boolean/0) - Whether to pad waveform on both sides so that the t-th frame is centered at time t * hop_length. The default value istrue.:pad_mode(atom/0) - Controls the padding method used when center is true. The default value is:reflect.:onesided(boolean/0) - Controls whether to return half of results to avoid redundancy. The default value istrue.