kaldi_resample_waveform.Rd
Resamples the waveform at the new frequency.
kaldi_resample_waveform(
waveform,
orig_freq,
new_freq,
lowpass_filter_width = 6
)
(Tensor): The input signal of size (c, n)
(float): The original frequency of the signal
(float): The desired frequency
(int, optional): Controls the sharpness of the filter, more == sharper
but less efficient. We suggest around 4 to 10 for normal use. (Default: 6
)
Tensor: The waveform at the new frequency
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.