audioflux.resample

audioflux.resample(x, source_samplate, target_samplate, re_type='scipy')

Resample audio data from source_sr to target_sr

Parameters
x: np.ndarray [shape=(…, frames)]

Audio data

source_samplate: int

Audio’s source sampling rate

target_samplate: int

Audio’s target sampling rate

re_type: str

Resample type

  • scipy: scipy.signal.resample

  • scipy_poly: scipy.signal.resample_poly

Returns
out: np.ndarray [shape=(…, frames)]

Resample audio data