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, default=False) – If True, prefer speed over quality and use resampy’s “kaiser_fast” filter instead of “kaiser_best”.
uid (str, optional) – Identifier of the resampler.
Methods:
run(segments)Return a resampled segment for each segment in segments.
set_prov_tracer(prov_tracer)Enable provenance tracing.
Attributes:
Contains all the operation init parameters.
- property description: OperationDescription#
Contains all the operation init parameters.
- Return type:
- set_prov_tracer(prov_tracer)#
Enable provenance tracing.
- Parameters:
prov_tracer (ProvTracer) – The provenance tracer used to trace the provenance.