ldc_bpcsad.utils
.resample
- ldc_bpcsad.utils.resample(x, orig_sr, new_sr)[source]
Resample audio from orig_sr to new_sr Hz.
Uses polyphase resampling as implemented within
scipy.signal
.- Parameters:
x (numpy.ndarray, (n_samples,)) – Time series to be resampled.
orig_sr (int) – Original sample rate (Hz) of x.
new_sr (int) – New sample rate (Hz).
- Returns:
x_resamp – Version of x resampled from orig_sr Hz to new_sr Hz.
- Return type:
numpy.ndarray, (n_samples * new_sr / orig_sr,)
See also