View Source NxAudio.Transforms.ResampleConfig (nx_audio v0.3.0)

Configuration options for audio resampling transformation.

Summary

Types

t()
  • :orig_freq (non_neg_integer/0) - Original sampling frequency of the audio. The default value is 16000.

Functions

Parses and validates a keyword list into a valid resample config

Types

t()

@type t() :: [
  orig_freq: non_neg_integer(),
  new_freq: non_neg_integer(),
  resampling_method: term(),
  lowpass_filter_width: non_neg_integer(),
  rolloff: float(),
  beta: float() | nil
]
  • :orig_freq (non_neg_integer/0) - Original sampling frequency of the audio. The default value is 16000.

  • :new_freq (non_neg_integer/0) - Target sampling frequency for resampling. The default value is 16000.

  • :resampling_method - Method used for resampling the audio signal. The default value is :sinc_interp_hann.

  • :lowpass_filter_width (non_neg_integer/0) - Width of the lowpass filter used in resampling. The default value is 6.

  • :rolloff (float/0) - Roll-off frequency of the filter as a fraction of the Nyquist frequency. The default value is 0.99.

  • :beta - Kaiser window beta parameter. Only used when window type is kaiser. The default value is 12.0.

Functions

validate!(config)

Parses and validates a keyword list into a valid resample config