medkit.core.audio.operation#

Classes#

PreprocessingOperation

Abstract operation for pre-processing segments.

SegmentationOperation

Abstract operation for segmenting audio.

Module Contents#

class medkit.core.audio.operation.PreprocessingOperation(uid: str | None = None, name: str | None = None, **kwargs)#

Bases: medkit.core.operation.Operation

Abstract operation for pre-processing segments.

It uses a list of segments as input and produces a list of pre-processed segments. Each input segment will have a corresponding output segment.

abstract run(segments: list[medkit.core.audio.annotation.Segment]) list[medkit.core.audio.annotation.Segment]#
class medkit.core.audio.operation.SegmentationOperation(uid: str | None = None, name: str | None = None, **kwargs)#

Bases: medkit.core.operation.Operation

Abstract operation for segmenting audio.

It uses a list of segments as input and produces a list of new segments. Each input segment will have zero, one or more corresponding output segments.

abstract run(segments: list[medkit.core.audio.annotation.Segment]) list[medkit.core.audio.annotation.Segment]#