medkit.core.audio.annotation#
Classes#
Audio segment referencing part of an |
Module Contents#
- class medkit.core.audio.annotation.Segment(label: str, audio: medkit.core.audio.audio_buffer.AudioBuffer, span: medkit.core.audio.span.Span, attrs: list[medkit.core.attribute.Attribute] | None = None, metadata: dict[str, Any] | None = None, uid: str | None = None)#
Bases:
medkit.core.dict_conv.SubclassMapping
Audio segment referencing part of an
AudioDocument
.- Attributes:
- uid: str
Unique identifier of the segment.
- label: str
Label of the segment.
- audio: AudioBuffer
The audio signal of the segment. It must be consistent with the span, in the sense that it must correspond to the audio signal of the document at the span boundaries. But it can be a modified, processed version of this audio signal.
- span: Span
Span (in seconds) indicating the part of the document’s full signal that this segment references.
- attrs: AttributeContainer
Attributes of the segment. Stored in a :class:{~medkit.core.AttributeContainer} but can be passed as a list at init.
- metadata: dict of str to Any
Metadata of the segment.
- keys: set of str
Pipeline output keys to which the annotation belongs to.
- uid: str#
- label: str#
- metadata: dict[str, Any]#
- keys: set[str]#
- classmethod __init_subclass__()#
- to_dict() dict[str, Any] #