medkit.audio.preprocessing.resampler
medkit.audio.preprocessing.resampler#
This module needs extra-dependencies not installed as core dependencies of medkit. To install them, use pip install medkit-lib[resampler].
Classes:
|
Resampling operation relying on the resampy package. |
- class Resampler(output_label, sample_rate, fast=False, uid=None)[source]#
Resampling operation relying on the resampy package.
- Parameters
output_label (
str) – Label of output resampled segments.sample_rate (
int) – Target sample rate to resample to, in samples per second.fast (
bool) – If True, prefer speed over quality and use resampy’s “kaiser_fast” filter instead of “kaiser_best”.uid (str) – Identifier of the resampler.
Methods:
run(segments)Return a resampled segment for each segment in segments.