kaldi_resample_waveform: Kaldi's Resample Waveform

View source: R/kaldi.R

kaldi_resample_waveformR Documentation

Kaldi's Resample Waveform

Description

Resamples the waveform at the new frequency.

Usage

kaldi_resample_waveform(
  waveform,
  orig_freq,
  new_freq,
  lowpass_filter_width = 6
)

Arguments

waveform

(Tensor): The input signal of size (c, n)

orig_freq

(float): The original frequency of the signal

new_freq

(float): The desired frequency

lowpass_filter_width

(int, optional): Controls the sharpness of the filter, more == sharper but less efficient. We suggest around 4 to 10 for normal use. (Default: 6)

Details

This matches Kaldi's OfflineFeatureTpl ResampleWaveform which uses a LinearResample (resample a signal at linearly spaced intervals to upsample/downsample a signal). LinearResample (LR) means that the output signal is at linearly spaced intervals (i.e the output signal has a frequency of new_freq). It uses sinc/bandlimited interpolation to upsample/downsample the signal.

Value

Tensor: The waveform at the new frequency

References


curso-r/torchaudio documentation built on Aug. 6, 2022, 2:28 a.m.