Skip to content

Resample

Added in v0.8.0

Resample signal using librosa.core.resample

To do downsampling only, set both minimum and maximum sampling rate lower than original sampling rate. Conversely, to perform upsampling only, set both rates higher than the original sampling rate.

Resample API

min_sample_rate: int • unit: Hz
Default: 8000. The minimum sample rate
max_sample_rate: int • unit: Hz
Default: 44100. The maximum sample rate
p: float • range: [0.0, 1.0]
Default: 0.5. The probability of applying this transform.

Source code

audiomentations/augmentations/resample.py