Data Module#
Basic Models#
soundevent.data
#
Data Module.
Classes:
Name | Description |
---|---|
User |
Information about a user. |
Term |
A term class for a standardised term. |
Tag |
Tag Class. |
Feature |
Feature Class. |
Note |
Note Class. |
Recording |
Represents an audio recording in bioacoustic research. |
RecordingSet |
|
Dataset |
|
SoundEvent |
Sound Event Class. |
Sequence |
Sequence Class. |
Clip |
Clip Class. |
SoundEventAnnotation |
Annotation Class. |
SequenceAnnotation |
A class representing the annotations of a sequence. |
ClipAnnotation |
Clip Annotations Class. |
AnnotationState |
Annotation State Enumeration. |
StatusBadge |
Annotation Status Badge Class. |
AnnotationTask |
|
AnnotationSet |
Annotation Set Class. |
AnnotationProject |
Annotation Project Class. |
PredictedTag |
Predicted Tag Class. |
SoundEventPrediction |
Predicted Sound Event Class. |
SequencePrediction |
A class representing a sequence prediction. |
ClipPrediction |
Clip Prediction. |
PredictionSet |
ModelRun Class. |
ModelRun |
|
EvaluationSet |
Evaluation Set Class. |
Match |
Match Class. |
ClipEvaluation |
Evaluated example model. |
Evaluation |
Evaluation Class. |
Classes#
User
#
Bases: BaseModel
Information about a user.
Attributes:
Name | Type | Description |
---|---|---|
email |
Optional[EmailStr]
|
|
institution |
Optional[str]
|
|
model_config |
|
|
name |
Optional[str]
|
|
username |
Optional[str]
|
|
uuid |
UUID
|
|
Attributes#
email: Optional[EmailStr] = Field(None, repr=False)
class-attribute
instance-attribute
#
institution: Optional[str] = Field(None, repr=False)
class-attribute
instance-attribute
#
model_config = ConfigDict(from_attributes=True)
class-attribute
instance-attribute
#
name: Optional[str] = Field(None, repr=True)
class-attribute
instance-attribute
#
username: Optional[str] = Field(None, repr=True)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4, repr=False)
class-attribute
instance-attribute
#
Term
#
Bases: BaseModel
A term class for a standardised term.
Attributes:
Attributes#
comment: Optional[str] = Field(serialization_alias='rdfs:comment', default=None, title='Comment', description='Additional information about the term or its application.', repr=False, json_schema_extra={'$id': 'https://www.w3.org/TR/rdf-schema/#ch_comment'})
class-attribute
instance-attribute
#
definition: str = Field(serialization_alias='skos:definition', title='Definition', description='The type of term: property, class, datatype, or vocabulary encoding scheme.', repr=False, json_schema_extra={'$id': 'http://www.w3.org/2004/02/skos/core#definition'})
class-attribute
instance-attribute
#
description: Optional[str] = Field(default=None, serialization_alias='dcterms:description', title='Description', description='An account of the resource.', repr=False, json_schema_extra={'$id': 'http://purl.org/dc/terms/description'})
class-attribute
instance-attribute
#
domain: Optional[str] = Field(default=None, serialization_alias='rdfs:domain', title='Domain', description='A class of which a resource described by the term is an instance.', repr=False, json_schema_extra={'$id': 'https://www.w3.org/TR/rdf-schema/#ch_domain'})
class-attribute
instance-attribute
#
domain_includes: Optional[str] = Field(default=None, serialization_alias='dcam:domainIncludes', title='Domain Includes', description='A suggested class for subjects of this property.', repr=False, json_schema_extra={'$id': 'http://purl.org/dc/dcam/domainIncludes'})
class-attribute
instance-attribute
#
equivalent_property: Optional[str] = Field(default=None, serialization_alias='owl:equivalentProperty', title='Equivalent Property', description='A property to which the described term is equivalent.', repr=False, json_schema_extra={'$id': 'https://www.w3.org/TR/owl-ref/#equivalentProperty-def'})
class-attribute
instance-attribute
#
instance_of: Optional[str] = Field(default=None, serialization_alias='instanceOf', title='Instance Of', description='A class of which the described term is an instance.', repr=False)
class-attribute
instance-attribute
#
label: str = Field(serialization_alias='rdfs:label', title='Label', description='The human-readable label assigned to the term.', repr=True, json_schema_extra={'$id': 'https://www.w3.org/TR/rdf-schema/#ch_label'})
class-attribute
instance-attribute
#
member_of: Optional[str] = Field(default=None, serialization_alias='dcam:memberOf', title='Member Of', description='A collection of which the described term is a member.', repr=False, json_schema_extra={'$id': 'http://purl.org/dc/dcam/memberOf'})
class-attribute
instance-attribute
#
model_config = ConfigDict(frozen=True, extra='allow')
class-attribute
instance-attribute
#
name: str = Field(title='Name', description='A token appended to the URI of a DCMI namespace to create the URI of the term.', repr=False)
class-attribute
instance-attribute
#
range_includes: Optional[str] = Field(default=None, serialization_alias='dcam:rangeIncludes', title='Range Includes', description='A suggested class for values of this property.', repr=False, json_schema_extra={'$id': 'http://purl.org/dc/dcam/rangeIncludes'})
class-attribute
instance-attribute
#
scope_note: Optional[str] = Field(default=None, serialization_alias='skos:scopeNote', title='Scope Note', description='A note that helps to clarify the meaning and/or the use of a concept.', repr=False, json_schema_extra={'$id': 'https://www.w3.org/2012/09/odrl/semantic/draft/doco/skos_scopeNote'})
class-attribute
instance-attribute
#
see: Optional[str] = Field(default=None, serialization_alias='rdsf:seeAlso', title='See', description='Authoritative documentation related to the term.', repr=False, json_schema_extra={'$id': 'https://www.dublincore.org/specifications/dublin-core/dcmi-terms/dublin_core_terms.ttl'})
class-attribute
instance-attribute
#
subclass_of: Optional[str] = Field(default=None, serialization_alias='rdfs:subclassOf', title='Subclass Of', description='A class of which the described term is a sub-class.', repr=False, json_schema_extra={'$id': 'https://www.w3.org/TR/rdf-schema/#ch_subclassof'})
class-attribute
instance-attribute
#
subproperty_of: Optional[str] = Field(default=None, serialization_alias='rdfs:subpropertyOf', title='Subproperty Of', description='A property of which the described term is a sub-property.', repr=False, json_schema_extra={'$id': 'https://www.w3.org/TR/rdf-schema/#ch_subpropertyof'})
class-attribute
instance-attribute
#
term_range: Optional[str] = Field(default=None, serialization_alias='rdfs:range', alias='range', title='Range', description='A class of which a value described by the term is an instance.', json_schema_extra={'$id': 'https://www.w3.org/TR/rdf-schema/#ch_range'}, repr=False)
class-attribute
instance-attribute
#
type_of_term: str = Field(serialization_alias='dcterms:type', default='property', alias='type', title='Type', description='The nature or genre of the resource.', repr=False, json_schema_extra={'$id': 'http://purl.org/dc/terms/type'})
class-attribute
instance-attribute
#
uri: Optional[str] = Field(serialization_alias='dcterms:URI', default=None, title='URI', repr=False, description='The Uniform Resource Identifier used to uniquely identify a term.', json_schema_extra={'$id': 'http://purl.org/dc/terms/URI'})
class-attribute
instance-attribute
#
Tag
#
Bases: BaseModel
Tag Class.
Tags annotate and categorize bioacoustic research components. Each tag is a
term-value
pair. The term
provides context and enables categorization.
Attributes:
Name | Type | Description |
---|---|---|
term |
Term
|
The standardized term associated with the tag, providing context and meaning. |
value |
str
|
The value associated with the tag, offering specific information. |
Notes
The key
attribute is deprecated. Use term
instead.
Methods:
Name | Description |
---|---|
handle_deprecated_key |
|
Attributes:
Name | Type | Description |
---|---|---|
key |
str
|
Return the key of the tag. |
term |
Term
|
|
value |
str
|
|
Attributes#
key: str
property
#
Return the key of the tag.
term: Term = Field(title='Term', description='The standardised term associated with the tag.', repr=True)
class-attribute
instance-attribute
#
value: str = Field(title='Value', description='The value associated with the tag.', repr=True)
class-attribute
instance-attribute
#
Functions#
handle_deprecated_key(values)
classmethod
#
Feature
#
Bases: BaseModel
Feature Class.
Features are numerical values associated with sound events, clips, and recordings, providing additional metadata. These numerical descriptors enable searching, organizing, and analyzing bioacoustic data.
Attributes:
Name | Type | Description |
---|---|---|
term |
Term
|
The standardized term associated with the feature, providing context and meaning. |
value |
float
|
The numeric value quantifying the feature, enabling precise comparison and analysis. |
Methods:
Name | Description |
---|---|
handle_deprecated_name |
|
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
Return the name of the feature. |
term |
Term
|
|
value |
float
|
|
Note
#
Bases: BaseModel
Note Class.
Notes play a pivotal role in the annotation process, providing essential textual context and enabling effective communication among users. Attached to recordings, clips, or sound events, notes serve various purposes, from offering contextual information and explanations to flagging issues and initiating discussions. This collaborative tool enhances the accuracy and depth of annotations while promoting a richer understanding of the audio data.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
UUID
|
A unique identifier for the note, automatically generated upon creation. This ID distinguishes each note, ensuring a clear reference for annotators and researchers. |
message |
str
|
The content of the note, which can include contextual information, explanations, issues, alternative interpretations, or any other relevant details. The message provides valuable insights and explanations related to the annotated material. |
created_by |
Optional[User]
|
The identifier of the user who created the note. While optional, including this information enables users to understand the source of the note, fostering transparency and accountability within the annotation process. |
is_issue |
bool
|
A flag indicating whether the note highlights an issue or concern. When set to True, the note signals incomplete or incorrect annotations, guiding annotators' attention to specific areas that require further review and refinement. |
created_on |
datetime
|
The date and time when the note was created. This timestamp provides a historical record of the note's origin, allowing users to track the timeline of annotations and discussions. |
Attributes:
Name | Type | Description |
---|---|---|
created_by |
Optional[User]
|
|
created_on |
datetime
|
|
is_issue |
bool
|
|
message |
str
|
|
uuid |
UUID
|
|
Attributes#
created_by: Optional[User] = None
class-attribute
instance-attribute
#
created_on: datetime.datetime = Field(default_factory=datetime.datetime.now)
class-attribute
instance-attribute
#
is_issue: bool = False
class-attribute
instance-attribute
#
message: str
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4)
class-attribute
instance-attribute
#
Recording
#
Bases: BaseModel
Represents an audio recording in bioacoustic research.
This class models raw, unaltered audio files as captured by recording devices. Recordings are fundamental to bioacoustic research and are identified by various metadata, including:
- Unique identifier
- File path
- Duration
- Number of channels
- Sample rate
- Time expansion factor
- Hash
- Geographic coordinates
- Tags, features, and notes
Notes
For time-expanded audio (slowed down or sped up), the duration
and
sample_rate
reflect the original recording values, not the modified
values in the file. This ensures accuracy in representing the audio's true
capture conditions.
Methods:
Name | Description |
---|---|
from_file |
Create a recording object from a file. |
Attributes:
Name | Type | Description |
---|---|---|
channels |
int
|
The number of channels in the audio file. |
date |
Optional[date]
|
The date on which the recording was made. |
duration |
float
|
The duration of the audio file in seconds. |
features |
List[Feature]
|
A list of features associated with the recording. |
hash |
Optional[str]
|
The md5 hash of the audio file. |
latitude |
Optional[float]
|
The latitude coordinate of the site of recording. |
license |
Optional[str]
|
|
longitude |
Optional[float]
|
|
model_config |
|
|
notes |
List[Note]
|
A list of notes associated with the recording. |
owners |
List[User]
|
|
path |
Path
|
The file path to the audio recording. |
rights |
Optional[str]
|
|
samplerate |
int
|
The sample rate of the audio file in Hz. |
tags |
List[Tag]
|
A list of tags associated with the recording. |
time |
Optional[time]
|
The time at which the recording was made. |
time_expansion |
float
|
The time expansion factor of the audio file. |
uuid |
UUID
|
A unique identifier for the recording. |
Attributes#
channels: int = Field(title='Channels', serialization_alias='mo:channels', description='The number of channels in the audio file.', repr=False, json_schema_extra={'$id': 'http://purl.org/ontology/mo/channels'})
class-attribute
instance-attribute
#
The number of channels in the audio file.
date: Optional[datetime.date] = Field(default=None, repr=False, deprecated=False)
class-attribute
instance-attribute
#
The date on which the recording was made.
Default is None.
duration: float = Field(title='Duration', serialization_alias='ac:mediaDuration', description='The duration of the audio file in seconds.', repr=False, json_schema_extra={'$id': 'http://rs.tdwg.org/ac/terms/mediaDuration'})
class-attribute
instance-attribute
#
The duration of the audio file in seconds.
This duration is adjusted by the time expansion factor if the audio file is time expanded, providing the real duration of the recorded audio.
features: List[Feature] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
A list of features associated with the recording.
hash: Optional[str] = Field(default=None, serialization_alias='ac:hashValue', title='Hash', description='The value computed by a hash function applied to the media that will be delivered at the access point.', repr=False, json_schema_extra={'$id': 'http://rs.tdwg.org/ac/terms/hashValue'})
class-attribute
instance-attribute
#
The md5 hash of the audio file.
Default is None.
latitude: Optional[float] = Field(default=None, serialization_alias='dwc:decimalLatitude', title='Decimal Latitude', description='The geographic latitude (in decimal degrees, using the spatial reference system given in dwc:geodeticDatum) of the geographic center of a dcterms:Location. Positive values are north of the Equator, negative values are south of it. Legal values lie between -90 and 90, inclusive.', repr=False, json_schema_extra={'$id': 'http://rs.tdwg.org/dwc/terms/decimalLatitude'})
class-attribute
instance-attribute
#
The latitude coordinate of the site of recording.
Default is None.
license: Optional[str] = Field(default=None, serialization_alias='dcterms:license', title='License', description='A legal document giving official permission to do something with the resource.', repr=False, json_schema_extra={'$id': 'http://purl.org/dc/terms/license'})
class-attribute
instance-attribute
#
longitude: Optional[float] = Field(default=None, serialization_alias='dwc:decimalLongitude', title='Decimal Longitude', description='The geographic longitude (in decimal degrees, using the spatial reference system given in dwc:geodeticDatum) of the geographic center of a dcterms:Location. Positive values are east of the Greenwich Meridian, negative values are west of it. Legal values lie between -180 and 180, inclusive.', repr=False, json_schema_extra={'$id': 'http://rs.tdwg.org/dwc/terms/decimalLongitude'})
class-attribute
instance-attribute
#
model_config = ConfigDict(extra='allow')
class-attribute
instance-attribute
#
notes: List[Note] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
A list of notes associated with the recording.
owners: List[User] = Field(default_factory=list, serialization_alias='xmpRights:Owner', title='Copyright Owner', description='A list of legal owners of the resource.', repr=False, json_schema_extra={'$id': 'http://ns.adobe.com/xap/1.0/rights/Owner'})
class-attribute
instance-attribute
#
path: Path = Field(title='Path', description='The path to the audio file.', repr=True)
class-attribute
instance-attribute
#
The file path to the audio recording.
rights: Optional[str] = Field(default=None, serialization_alias='dcterms:rights', title='Copyright Statement', description='Information about rights held in and over the resource.', repr=False, json_schema_extra={'$id': 'http://purl.org/dc/terms/rights'})
class-attribute
instance-attribute
#
samplerate: int = Field(title='Sample Rate', serialization_alias='mo:sample_rate', description='The sample rate of the audio file in Hz.', repr=False, json_schema_extra={'$id': 'http://purl.org/ontology/mo/sample_rate'})
class-attribute
instance-attribute
#
The sample rate of the audio file in Hz.
Similar to duration, the sample rate is adjusted by the time expansion factor if the audio file is time expanded, representing the real sample rate of the recorded audio.
tags: List[Tag] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
A list of tags associated with the recording.
time: Optional[datetime.time] = Field(default=None, repr=False, deprecated=False)
class-attribute
instance-attribute
#
The time at which the recording was made.
Default is None.
time_expansion: float = Field(default=1.0, serialization_alias='ac:mediaSpeed', title='Media Speed', description='The decimal fraction representing the natural speed over the encoded speed.', repr=False, json_schema_extra={'$id': 'http://rs.tdwg.org/ac/terms/mediaSpeed'})
class-attribute
instance-attribute
#
The time expansion factor of the audio file.
Default is 1.0, indicating no time expansion.
uuid: UUID = Field(default_factory=uuid4, serialization_alias='dcterms:identifier', title='Identifier', description='An unambiguous reference to the resource within a given context.', repr=False, json_schema_extra={'$id': 'http://purl.org/dc/terms/identifier'})
class-attribute
instance-attribute
#
A unique identifier for the recording.
Functions#
from_file(path, time_expansion=1, compute_hash=True, **kwargs)
classmethod
#
Create a recording object from a file.
This function does not load the audio data itself, but rather extracts the metadata from the file and creates a recording object with the appropriate metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
PathLike
|
The path to the audio file. |
required |
time_expansion
|
float
|
The time expansion factor of the audio file, by default 1. |
1
|
compute_hash
|
bool
|
Whether to compute the md5 hash of the audio file, by default True. If you are loading a large number of recordings, you might want to set this to False to speed up the loading process. |
True
|
**kwargs
|
Additional keyword arguments to pass to the constructor. |
{}
|
Returns:
Type | Description |
---|---|
Recording
|
The recording object. |
RecordingSet
#
Bases: BaseModel
Attributes:
Name | Type | Description |
---|---|---|
created_on |
datetime
|
|
recordings |
List[Recording]
|
|
uuid |
UUID
|
|
Attributes#
created_on: datetime.datetime = Field(default_factory=datetime.datetime.now)
class-attribute
instance-attribute
#
recordings: List[Recording] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4)
class-attribute
instance-attribute
#
Dataset
#
Bases: RecordingSet
Methods:
Name | Description |
---|---|
from_directory |
Return a dataset from the directory. |
Attributes:
Name | Type | Description |
---|---|---|
description |
Optional[str]
|
|
name |
str
|
|
Attributes#
description: Optional[str] = None
class-attribute
instance-attribute
#
name: str
instance-attribute
#
Functions#
from_directory(path, name, description=None, recursive=True, compute_hash=True)
classmethod
#
Return a dataset from the directory.
Reads the audio files in the directory and returns a dataset containing the recordings.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
PathLike
|
Path to the directory. |
required |
recursive
|
bool
|
Whether to search the directory recursively, by default True |
True
|
compute_hash
|
bool
|
Whether to compute the hash of the audio files, by default |
True
|
Returns:
Type | Description |
---|---|
Dataset
|
The dataset. |
Raises:
Type | Description |
---|---|
ValueError
|
If the path is not a directory. |
SoundEvent
#
Bases: BaseModel
Sound Event Class.
Represents a specific sound event detected within a recording. Each sound event is characterized by a unique identifier, the recording in which it occurs, its spatial geometry (if available), associated tags, and features. Sound events are fundamental entities used for studying and categorizing various acoustic phenomena within audio recordings.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
UUID
|
A unique identifier (UUID) for the sound event. |
geometry |
Optional[Geometry]
|
The spatial geometry locating the sound event within the recording. Can include information about the event's position, duration, and frequency range. |
features |
List[Feature]
|
A list of features associated with the sound event, offering quantitative information about its acoustic properties. |
Attributes:
Name | Type | Description |
---|---|---|
features |
List[Feature]
|
|
geometry |
Optional[Geometry]
|
|
recording |
Recording
|
|
uuid |
UUID
|
|
Sequence
#
Bases: BaseModel
Sequence Class.
Represents a sequence of sound events in bioacoustic research. A sequence is a ordered collection of sound events, each characterized by its unique identifier, associated tags, features, and notes. Sequences can be hierarchical, allowing the organization of sub-sequences under parent sequences.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
UUID
|
A unique identifier for the sequence. |
sound_events |
List[SoundEvent]
|
A list of sound events within the sequence. |
features |
List[Feature]
|
A list of features associated with the sequence, offering quantitative information about the sequence's acoustic characteristics. |
parent |
Optional[Sequence]
|
If the sequence is a subsequence, this attribute refers to the parent sequence under which the current sequence is organized. |
Attributes:
Name | Type | Description |
---|---|---|
features |
List[Feature]
|
|
parent |
Optional[Sequence]
|
|
sound_events |
List[SoundEvent]
|
|
uuid |
UUID
|
|
Attributes#
features: List[Feature] = Field(default_factory=list)
class-attribute
instance-attribute
#
parent: Optional[Sequence] = None
class-attribute
instance-attribute
#
sound_events: List[SoundEvent] = Field(default_factory=list)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4)
class-attribute
instance-attribute
#
Clip
#
Bases: BaseModel
Clip Class.
The Clip
class represents a specific segment of an audio recording within
the context of bioacoustic research. Clips provide isolated and manageable
portions of audio data, essential for analysis, annotation, and machine
learning tasks.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
(UUID, optional)
|
The unique identifier of the clip, automatically generated upon creation. This identifier distinguishes the clip from others and is crucial for referencing and management purposes. |
recording |
Recording
|
An instance of the |
start_time |
float
|
The start time of the clip in seconds, indicating the beginning point of the segment within the recording's timeline. Start time is essential for accurate temporal positioning and alignment of the clip within the context of the original recording. |
end_time |
float
|
The end time of the clip in seconds, representing the conclusion of the segment within the recording's timeline. End time provides clear boundaries for the duration of the clip, aiding in precise temporal delineation and analysis of the audio content. |
features |
(List[Feature], optional)
|
A list of |
Attributes:
Name | Type | Description |
---|---|---|
duration |
float
|
Return the duration of the clip. |
end_time |
float
|
|
features |
List[Feature]
|
|
recording |
Recording
|
|
start_time |
float
|
|
uuid |
UUID
|
|
Attributes#
duration: float
property
#
Return the duration of the clip.
end_time: float
instance-attribute
#
features: List[Feature] = Field(default_factory=list)
class-attribute
instance-attribute
#
recording: Recording
instance-attribute
#
start_time: float
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4)
class-attribute
instance-attribute
#
SoundEventAnnotation
#
Bases: BaseModel
Annotation Class.
The Annotation
class encapsulates essential information about a specific
annotation created within a bioacoustic research project. Annotations
provide detailed labeling for individual sound events, enhancing the
interpretability and utility of audio data.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
UUID
|
A unique identifier for the annotation, automatically generated upon creation. This identifier distinguishes the annotation from others and is crucial for referencing and management purposes. |
created_by |
Optional[User]
|
The user who created the annotation, providing insights into the annotator's identity. This information is valuable for tracking and accountability within annotation projects. |
sound_event |
SoundEvent
|
An instance of the |
Notes
A list of `Note` instances representing additional contextual information or
remarks associated with the annotation. Notes can provide insights into specific
characteristics of the sound event, aiding in the comprehensive understanding
of the annotated data.
tags
A list of Tag
instances representing user-provided tags associated with the
annotated sound event. These tags offer additional semantic context to the
annotation, enabling detailed classification and facilitating targeted analysis
of the acoustic content.
created_on
The timestamp indicating the time at which the annotation was created. This
information is essential for tracking the progress of an annotation task and
understanding the chronological order of annotations within a project.
Attributes:
Name | Type | Description |
---|---|---|
created_by |
Optional[User]
|
|
created_on |
datetime
|
|
notes |
List[Note]
|
|
sound_event |
SoundEvent
|
|
tags |
List[Tag]
|
|
uuid |
UUID
|
|
Attributes#
created_by: Optional[User] = None
class-attribute
instance-attribute
#
created_on: datetime.datetime = Field(default_factory=datetime.datetime.now, repr=False)
class-attribute
instance-attribute
#
notes: List[Note] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
sound_event: SoundEvent
instance-attribute
#
tags: List[Tag] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4, repr=False)
class-attribute
instance-attribute
#
SequenceAnnotation
#
Bases: BaseModel
A class representing the annotations of a sequence.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
UUID
|
A unique identifier for the annotation. |
sequence |
Sequence
|
The sequence being annotated. |
Notes
A list of notes associated with the sequence.
tags The tags attached to the sequence providing semantic information. created_on The date and time the annotation was created. created_by The user who created the annotation.
Attributes:
Name | Type | Description |
---|---|---|
created_by |
Optional[User]
|
|
created_on |
datetime
|
|
notes |
List[Note]
|
|
sequence |
Sequence
|
|
tags |
List[Tag]
|
|
uuid |
UUID
|
|
Attributes#
created_by: Optional[User] = None
class-attribute
instance-attribute
#
created_on: datetime.datetime = Field(default_factory=datetime.datetime.now, repr=False)
class-attribute
instance-attribute
#
notes: List[Note] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
sequence: Sequence
instance-attribute
#
tags: List[Tag] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4, repr=False)
class-attribute
instance-attribute
#
ClipAnnotation
#
Bases: BaseModel
Clip Annotations Class.
Represents annotations associated with a specific audio clip.
ClipAnnotations encapsulates details about the audio clip, associated tags, annotations of sound events, status badges indicating the state of the annotation process, and any additional notes related to the annotations.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
UUID
|
A unique identifier automatically generated for the clip annotations. |
clip |
Clip
|
The Clip instance representing the audio clip associated with these annotations. |
tags |
List[Tag]
|
A list of Tag instances defining the set of tags associated with the clip. |
annotations |
A list of Annotation instances representing detailed annotations of sound events in the clip. |
Notes
A list of Note instances representing additional contextual
information or remarks associated with the clip.
Attributes:
Name | Type | Description |
---|---|---|
clip |
Clip
|
|
created_on |
datetime
|
|
notes |
List[Note]
|
|
sequences |
List[SequenceAnnotation]
|
|
sound_events |
List[SoundEventAnnotation]
|
|
tags |
List[Tag]
|
|
uuid |
UUID
|
|
Attributes#
clip: Clip
instance-attribute
#
created_on: datetime.datetime = Field(default_factory=datetime.datetime.now)
class-attribute
instance-attribute
#
notes: List[Note] = Field(default_factory=list)
class-attribute
instance-attribute
#
sequences: List[SequenceAnnotation] = Field(default_factory=list)
class-attribute
instance-attribute
#
sound_events: List[SoundEventAnnotation] = Field(default_factory=list)
class-attribute
instance-attribute
#
tags: List[Tag] = Field(default_factory=list)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4)
class-attribute
instance-attribute
#
AnnotationState
#
Annotation State Enumeration.
Enumeration representing the different states an audio clip can be in
during the annotation process. The AnnotationState
enum provides clear
insights into the progress of the annotation process, helping users
understand the current stage of the annotation of the clip.
Attributes:
Name | Type | Description |
---|---|---|
assigned |
The clip has been assigned to an annotator and is awaiting completion. |
|
completed |
The clip has been fully annotated and is awaiting review. |
|
verified |
The clip has been reviewed and accepted by the reviewer, indicating that the annotation is complete and accurate. |
|
rejected |
The clip annotations have been reviewed and rejected by the reviewer, indicating that the annotation is incomplete or inaccurate. |
Attributes:
Name | Type | Description |
---|---|---|
assigned |
|
|
completed |
|
|
rejected |
|
|
verified |
|
StatusBadge
#
Bases: BaseModel
Annotation Status Badge Class.
Represents an indicator of the current state of annotation for a clip.
The StatusBadge class includes information such as the task state, the responsible user, and the creation timestamp, providing insights into the clip's annotation progress.
Attributes:
Name | Type | Description |
---|---|---|
state |
AnnotationState
|
The AnntoationState enum indicating the current state of the annotation of the clip. |
owner |
Optional[User]
|
Optional field specifying the user responsible for this status badge. |
created_on |
datetime
|
The date and time when the status badge was created, providing a historical record of the badge's creation time. |
Attributes:
Name | Type | Description |
---|---|---|
created_on |
datetime
|
|
owner |
Optional[User]
|
|
state |
AnnotationState
|
|
AnnotationTask
#
Bases: BaseModel
Attributes:
Name | Type | Description |
---|---|---|
clip |
Clip
|
|
created_on |
datetime
|
|
status_badges |
List[StatusBadge]
|
|
uuid |
UUID
|
|
Attributes#
clip: Clip
instance-attribute
#
created_on: datetime.datetime = Field(default_factory=datetime.datetime.now)
class-attribute
instance-attribute
#
status_badges: List[StatusBadge] = Field(default_factory=list)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4, repr=False)
class-attribute
instance-attribute
#
AnnotationSet
#
Bases: BaseModel
Annotation Set Class.
Attributes:
Name | Type | Description |
---|---|---|
clip_annotations |
List[ClipAnnotation]
|
|
created_on |
datetime
|
|
uuid |
UUID
|
|
Attributes#
clip_annotations: List[ClipAnnotation] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
created_on: datetime.datetime = Field(default_factory=datetime.datetime.now)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4, repr=False)
class-attribute
instance-attribute
#
AnnotationProject
#
Bases: AnnotationSet
Annotation Project Class.
Attributes:
Name | Type | Description |
---|---|---|
annotation_tags |
List[Tag]
|
|
description |
Optional[str]
|
|
instructions |
Optional[str]
|
|
name |
str
|
|
tasks |
List[AnnotationTask]
|
|
Attributes#
annotation_tags: List[Tag] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
description: Optional[str] = None
class-attribute
instance-attribute
#
instructions: Optional[str] = None
class-attribute
instance-attribute
#
name: str
instance-attribute
#
tasks: List[AnnotationTask] = Field(default_factory=list, repr=False)
class-attribute
instance-attribute
#
PredictedTag
#
Bases: BaseModel
Predicted Tag Class.
Predicted tags are categorical descriptions generated by machine learning-based methods to represent processed sound clips. These descriptions include probability scores, reflecting the confidence of the tag assignment. Predicted tags serve as essential elements in audio analysis, providing insights into the characteristics of sound events.
Attributes:
Name | Type | Description |
---|---|---|
tag |
Tag
|
The predicted tag representing the categorical description of the sound event. |
score |
float
|
A probability score ranging from 0 to 1, indicating the confidence level of the tag assignment. A score of 1 signifies a high level of certainty in the assigned tag. When the audio analysis method does not provide a score, the default value is set to 1. |
Attributes:
Name | Type | Description |
---|---|---|
score |
float
|
|
tag |
Tag
|
|
SoundEventPrediction
#
Bases: BaseModel
Predicted Sound Event Class.
Predicted sound events represent the outcomes of automated methods and machine learning models employed to identify sound events within audio clips. These predictions provide valuable insights into the presence and characteristics of sound events, supporting comprehensive audio analysis.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
UUID
|
A unique identifier for the prediction, automatically generated upon creation. This identifier distinguishes each prediction, facilitating reference and management. |
sound_event |
SoundEvent
|
The predicted sound event captured by the automated method or machine learning model. This encapsulates details such as the sound event's temporal properties, and other essential characteristics. |
score |
float
|
A probability score indicating the confidence of the prediction. This score reflects the certainty of the event's identification within the clip. Researchers leverage these scores to assess the reliability and accuracy of the predictions, enabling further analysis and evaluation. |
tags |
List[PredictedTag]
|
A list of predicted tags associated with the sound event. Predicted tags provide semantic labels that offer insights into the nature and characteristics of the event. Each tag is assigned its own probability score, indicating the model's confidence in the relevance of the tag to the event. These scores assist researchers in understanding the significance and reliability of the predicted tags. |
Attributes:
Name | Type | Description |
---|---|---|
score |
float
|
|
sound_event |
SoundEvent
|
|
tags |
List[PredictedTag]
|
|
uuid |
UUID
|
|
Attributes#
score: float = Field(default=1, ge=0, le=1)
class-attribute
instance-attribute
#
sound_event: SoundEvent
instance-attribute
#
tags: List[PredictedTag] = Field(default_factory=list)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4)
class-attribute
instance-attribute
#
SequencePrediction
#
Bases: BaseModel
A class representing a sequence prediction.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
UUID
|
A unique identifier for the prediction. |
sequence |
Sequence
|
The sequence being predicted. |
score |
float
|
A score between 0 and 1 indicating the confidence in the prediction. |
tags |
List[PredictedTag]
|
List of tags attached to the sequence providing semantic information. |
Attributes:
Name | Type | Description |
---|---|---|
score |
float
|
|
sequence |
Sequence
|
|
tags |
List[PredictedTag]
|
|
uuid |
UUID
|
|
Attributes#
score: float = Field(default=1, ge=0, le=1)
class-attribute
instance-attribute
#
sequence: Sequence
instance-attribute
#
tags: List[PredictedTag] = Field(default_factory=list)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4)
class-attribute
instance-attribute
#
ClipPrediction
#
Bases: BaseModel
Clip Prediction.
Clip prediction encapsulate the outcomes of various processing steps applied to recording clips in bioacoustic research. These processing steps can include sound event detection, tag generation, and acoustic feature extraction.
Attributes:
Name | Type | Description |
---|---|---|
uuid |
UUID
|
A unique identifier for the processed clip. |
clip |
Clip
|
The original clip that was processed, serving as the basis for the analysis. |
sound_events |
Sequence[SoundEventPrediction]
|
A list of predicted sound events detected within the clip. Each predicted sound event contains information about its characteristics, including temporal and frequency properties. |
tags |
Sequence[PredictedTag]
|
A list of predicted tags generated at the clip level. These tags provide high-level semantic information about the clip's content, aiding in organization and categorization. |
features |
Sequence[Feature]
|
A list of acoustic features extracted from the clip. These features offer numerical representations describing properties such as signal-to-noise ratio, spectral centroid, or other acoustic characteristics. They enhance the understanding of the clip's acoustic content. |
Attributes:
Name | Type | Description |
---|---|---|
clip |
Clip
|
|
features |
Sequence[Feature]
|
|
sequences |
Sequence[SequencePrediction]
|
|
sound_events |
Sequence[SoundEventPrediction]
|
|
tags |
Sequence[PredictedTag]
|
|
uuid |
UUID
|
|
Attributes#
clip: Clip
instance-attribute
#
features: Sequence[Feature] = Field(default_factory=list)
class-attribute
instance-attribute
#
sequences: Sequence[SequencePrediction] = Field(default_factory=list)
class-attribute
instance-attribute
#
sound_events: Sequence[SoundEventPrediction] = Field(default_factory=list)
class-attribute
instance-attribute
#
tags: Sequence[PredictedTag] = Field(default_factory=list)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4, repr=False)
class-attribute
instance-attribute
#
PredictionSet
#
Bases: BaseModel
ModelRun Class.
The ModelRun
class represents a collection of processed audio clips
generated during a single run using the same processing method. In
bioacoustic research, applying consistent processing pipelines to sets of
audio clips is essential for maintaining comparability and ensuring the
reliability of research results.
Attributes:
Name | Type | Description |
---|---|---|
id |
The unique identifier of the model run, automatically generated upon creation. |
|
clips |
A list of |
|
created_on |
datetime
|
The date and time when the |
Attributes:
Name | Type | Description |
---|---|---|
clip_predictions |
List[ClipPrediction]
|
|
created_on |
datetime
|
|
uuid |
UUID
|
|
Attributes#
clip_predictions: List[ClipPrediction] = Field(default_factory=list)
class-attribute
instance-attribute
#
created_on: datetime.datetime = Field(default_factory=datetime.datetime.now)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4)
class-attribute
instance-attribute
#
ModelRun
#
EvaluationSet
#
Bases: AnnotationSet
Evaluation Set Class.
Attributes:
Name | Type | Description |
---|---|---|
description |
Optional[str]
|
|
evaluation_tags |
Sequence[Tag]
|
|
name |
str
|
|
Match
#
Bases: BaseModel
Match Class.
The Match
class represents the outcome of the matching process in
bioacoustic research. During this process, sound events from a source and a
target are compared based on a similarity metric. The matched sound events
are paired, and the Match object captures these pairs along with their
affinity scores, indicating the level of similarity between the matched
events.
Attributes:
Name | Type | Description |
---|---|---|
source |
Optional[SoundEventPrediction]
|
The predicted sound event that was matched from the source model run. |
target |
Optional[SoundEventAnnotation]
|
The annotation that was matched from the target evaluation set. |
affinity |
float
|
The affinity score quantifying the degree of geometric similarity between the matched source and target sound events. Affinity scores range from 0.0 (no similarity) to 1.0 (perfect match). Researchers can use this score to evaluate the strength and quality of the match. |
score |
Optional[float]
|
The score of the matched sound event. This score is typically used to evaluate the quality of the matched sound event. For example, the score could represent the probability of the sound event, or the confidence of the model in predicting the sound event. |
metrics |
Sequence[Feature]
|
A list of metrics that were computed for the matched sound event. These metrics can be used to evaluate the quality of the matched sound event, in addition to the affinity and score. |
Attributes:
Name | Type | Description |
---|---|---|
affinity |
float
|
|
metrics |
Sequence[Feature]
|
|
score |
Optional[float]
|
|
source |
Optional[SoundEventPrediction]
|
|
target |
Optional[SoundEventAnnotation]
|
|
uuid |
UUID
|
|
Attributes#
affinity: float = Field(default=0.0, ge=0.0, le=1.0)
class-attribute
instance-attribute
#
metrics: Sequence[Feature] = Field(default_factory=list)
class-attribute
instance-attribute
#
score: Optional[float] = Field(default=None, ge=0.0, le=1.0)
class-attribute
instance-attribute
#
source: Optional[SoundEventPrediction] = None
class-attribute
instance-attribute
#
target: Optional[SoundEventAnnotation] = None
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4)
class-attribute
instance-attribute
#
ClipEvaluation
#
Bases: BaseModel
Evaluated example model.
Attributes:
Name | Type | Description |
---|---|---|
annotations |
ClipAnnotation
|
An instance of the |
prediction |
An instance of the |
|
matches |
Sequence[Match]
|
A list of |
metrics |
Sequence[Feature]
|
A list of |
score |
Optional[float]
|
A float representing the overall score for the evaluated example. This score is usually some combination of the evaluation metrics, providing a single value that can be used to compare different models and evaluation examples. Can be used to rank predictions based on their overall score |
Attributes:
Name | Type | Description |
---|---|---|
annotations |
ClipAnnotation
|
|
matches |
Sequence[Match]
|
|
metrics |
Sequence[Feature]
|
|
predictions |
ClipPrediction
|
|
score |
Optional[float]
|
|
uuid |
UUID
|
|
Attributes#
annotations: ClipAnnotation
instance-attribute
#
matches: Sequence[Match] = Field(default_factory=list)
class-attribute
instance-attribute
#
metrics: Sequence[Feature] = Field(default_factory=list)
class-attribute
instance-attribute
#
predictions: ClipPrediction
instance-attribute
#
score: Optional[float] = Field(default=None, ge=0.0, le=1.0)
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4, repr=False)
class-attribute
instance-attribute
#
Evaluation
#
Bases: BaseModel
Evaluation Class.
Attributes:
Name | Type | Description |
---|---|---|
clip_evaluations |
Sequence[ClipEvaluation]
|
|
created_on |
datetime
|
|
evaluation_task |
str
|
|
metrics |
Sequence[Feature]
|
|
score |
Optional[float]
|
|
uuid |
UUID
|
|
Attributes#
clip_evaluations: Sequence[ClipEvaluation] = Field(default_factory=list)
class-attribute
instance-attribute
#
created_on: datetime.datetime = Field(default_factory=datetime.datetime.now)
class-attribute
instance-attribute
#
evaluation_task: str
instance-attribute
#
metrics: Sequence[Feature] = Field(default_factory=list)
class-attribute
instance-attribute
#
score: Optional[float] = Field(default=None, alias='score')
class-attribute
instance-attribute
#
uuid: UUID = Field(default_factory=uuid4, repr=False)
class-attribute
instance-attribute
#
Geometries#
soundevent.data.geometries
#
Geometry types.
Sound event geometry plays a crucial role in locating and describing sound events within a recording. Different geometry types offer flexibility in representing the location of sound events, allowing for varying levels of detail and precision. The soundevent package follows the GeoJSON specification for geometry types and provides support for a range of geometry types.
Units and Time Reference#
All geometries in the soundevent package utilize seconds as the unit for time and hertz as the unit for frequency. It is important to note that time values are always relative to the start of the recording. By consistently using these units, it becomes easier to develop functions and interact with geometry objects based on convenient assumptions.
Supported Geometry Types#
The soundevent package supports the following geometry types, each serving a specific purpose in describing the location of sound events:
-
TimeStamp: Represents a single point in time.
-
TimeInterval: Describes a time interval, indicating a range of time within which the sound event occurs.
-
Point: Represents a specific point in time and frequency, pinpointing the exact location of the sound event.
-
LineString: Represents a sequence of points in time and frequency, allowing for the description of continuous sound events.
-
Polygon: Defines a closed shape in time and frequency, enabling the representation of complex sound event regions.
-
Box: Represents a rectangle in time and frequency, useful for specifying rectangular sound event areas.
-
Multi-Point: Describes a collection of points, allowing for the representation of multiple sound events occurring at different locations.
-
Multi-Line String: Represents a collection of line strings, useful for capturing multiple continuous sound events.
-
Multi-Polygon: Defines a collection of polygons, accommodating complex and overlapping sound event regions.
By offering these geometry types, the soundevent package provides a comprehensive framework for accurately and flexibly describing the location and extent of sound events within a recording.
Classes:
Name | Description |
---|---|
TimeStamp |
TimeStamp Geometry Class. |
TimeInterval |
TimeInterval Geometry Class. |
Point |
Point Geometry Class. |
LineString |
LineString Geometry Class. |
BoundingBox |
Bounding Box Geometry Class. |
Polygon |
Polygon Geometry Class. |
MultiPoint |
MultiPoint Geometry Class. |
MultiLineString |
MultiLineString Geometry Class. |
MultiPolygon |
MultiPolygon Geometry Class. |
Attributes:
Name | Type | Description |
---|---|---|
Geometry |
Geometry Type. |
Attributes#
Geometry = Union[TimeStamp, TimeInterval, Point, LineString, Polygon, BoundingBox, MultiPoint, MultiLineString, MultiPolygon]
module-attribute
#
Geometry Type.
The Geometry type is a versatile data structure designed to pinpoint sound events accurately within audio recordings. It encompasses a range of geometric representations, each tailored to specific use cases within bioacoustic research. These geometries play a fundamental role in describing the spatial and temporal characteristics of sound events, enabling precise analysis and interpretation.
Available Geometries:
TimeStamp
: Represents a sound event located at a specific point in time.TimeInterval
: Describes a sound event within a specified time interval.Point
: Locates a sound event at a precise time and frequency point.LineString
: Defines a sound event as a trajectory in time and frequency.Polygon
: Represents a complex shape in time and frequency, enclosing a sound event.BoundingBox
: Describes a sound event within a defined time and frequency range.MultiPoint
: Represents multiple discrete points in time and frequency as a single sound event.MultiLineString
: Describes a sound event formed by multiple connected trajectories.MultiPolygon
: Represents a sound event encompassed by multiple complex shapes.
Classes#
TimeStamp
#
Bases: BaseGeometry
TimeStamp Geometry Class.
The TimeStamp
class represents a specific time point within an audio
recording where a sound event occurs. This geometry type is particularly
useful for very short sound events that are not well-represented by a time
interval. TimeStamp
provides precise temporal localization, indicating
the exact moment when a sound event is detected.
Attributes:
Name | Type | Description |
---|---|---|
type |
TimeStampName
|
The type of geometry, always set to "TimeStamp," indicating the specific geometry type being utilized. This attribute ensures clear identification of the geometry representation and its intended purpose. |
coordinates |
Time
|
The time stamp of the sound event, specifying the exact moment, in seconds, when the event occurred relative to the start of the recording. The time stamp is represented in a standard format, allowing for consistent interpretation and synchronization across different applications and systems. |
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
Time
|
|
type |
TimeStampName
|
|
TimeInterval
#
Bases: BaseGeometry
TimeInterval Geometry Class.
The TimeInterval
class represents a specific time interval within an audio
recording where a sound event occurs. This geometry type is particularly useful
for events that have a clear start and end time but lack a well-defined frequency
range. TimeInterval
provides a structured way to define the duration of such
sound events, allowing for accurate temporal localization.
Attributes:
Name | Type | Description |
---|---|---|
type |
TimeIntervalName
|
The type of geometry, always set to "TimeInterval," indicating the specific geometry type being utilized. This attribute ensures clear identification of the geometry representation and its intended purpose. |
coordinates |
List[Time]
|
The time interval of the sound event, specifying the start and end times
of the event relative to the start of the recording. The time interval is
represented as a list of two |
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
List[Time]
|
|
type |
TimeIntervalName
|
|
Point
#
Bases: BaseGeometry
Point Geometry Class.
The Point
class represents a specific point in time and frequency within an
audio recording where a sound event occurs. This geometry type provides precise
localization, indicating both the exact moment and frequency content of the
event. Point
is ideal for events with well-defined temporal and spectral
characteristics, enabling accurate pinpointing of sound occurrences.
Attributes:
Name | Type | Description |
---|---|---|
type |
PointName
|
The type of geometry, always set to "Point," indicating the specific geometry type being utilized. This attribute ensures clear identification of the geometry representation and its intended purpose. |
coordinates |
List[float]
|
The points of the sound event, specifying both the time and frequency
components of the event relative to the start of the recording. The
|
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
List[float]
|
|
type |
PointName
|
|
LineString
#
Bases: BaseGeometry
LineString Geometry Class.
The LineString
class represents a continuous trajectory of sound events
within an audio recording, defined by a sequence of points in both time and
frequency. This geometry type is particularly valuable for events with
clear and defined frequency trajectories, allowing for detailed mapping of
sound occurrences over time. LineString
provides a comprehensive
representation for events that exhibit specific frequency patterns or
modulations.
Attributes:
Name | Type | Description |
---|---|---|
type |
LineStringName
|
The type of geometry, always set to "LineString," indicating the specific geometry type being utilized. This attribute ensures clear identification of the geometry representation and its intended purpose. |
coordinates |
List[List[float]]
|
The line of the sound event, specifying the trajectory of the event as
a list of points in both time and frequency. Each point is represented
as a list of two float values, indicating the time and frequency
coordinates of the event. The |
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
List[List[float]]
|
|
type |
LineStringName
|
|
BoundingBox
#
Bases: BaseGeometry
Bounding Box Geometry Class.
The BoundingBox
class represents sound events within an audio recording,
defined by a rectangular bounding box in both time and frequency. This
geometry type is suitable for events with clear and well-defined frequency
ranges, start and stop times. BoundingBox
provides a simple yet effective
way to localize sound events within a specific time interval and frequency
band, enabling accurate mapping of events that exhibit distinct spectral
content.
Attributes:
Name | Type | Description |
---|---|---|
type |
BoundingBoxName
|
The type of geometry, always set to "BoundingBox," indicating the specific geometry type being utilized. This attribute ensures clear identification of the geometry representation and its intended purpose. |
coordinates |
List[float]
|
The bounding box of the sound event, specifying the start and end times
as well as the start and end frequencies of the event. The
|
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
List[float]
|
|
type |
BoundingBoxName
|
|
Polygon
#
Bases: BaseGeometry
Polygon Geometry Class.
The Polygon
class represents complex-shaped sound events within an audio
recording, defined by a polygonal boundary in both time and frequency. This
geometry type is valuable for events that do not exhibit a concentrated
frequency band and are contained within intricate shapes on the
spectrogram. Polygon
provides a detailed and accurate representation for
sound events that require precise spatial localization and have diverse
frequency distributions.
Attributes:
Name | Type | Description |
---|---|---|
type |
PolygonName
|
The type of geometry, always set to "Polygon," indicating the specific geometry type being utilized. This attribute ensures clear identification of the geometry representation and its intended purpose. |
coordinates |
List[List[List[float]]]
|
The polygon of the sound event, specifying the boundary of the event as
a list of points in both time and frequency. Each point is represented
as a list of two float values, indicating the time and frequency
coordinates of the event. The |
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
List[List[List[float]]]
|
|
type |
PolygonName
|
|
MultiPoint
#
Bases: BaseGeometry
MultiPoint Geometry Class.
The MultiPoint
class represents sound events within an audio recording,
defined by multiple points in both time and frequency. This geometry type
is suitable for events that consist of multiple interesting points
distributed across the spectrogram. MultiPoint
allows researchers to
identify and map several distinct points within an event, providing a
detailed representation for complex acoustic patterns.
Attributes:
Name | Type | Description |
---|---|---|
type |
MultiPointName
|
The type of geometry, always set to "MultiPoint," indicating the specific geometry type being utilized. This attribute ensures clear identification of the geometry representation and its intended purpose. |
coordinates |
List[List[float]]
|
The points of the sound event, specifying the time and frequency
coordinates of each interesting point within the event. The
|
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
List[List[float]]
|
|
type |
MultiPointName
|
|
MultiLineString
#
Bases: BaseGeometry
MultiLineString Geometry Class.
The MultiLineString
class represents sound events within an audio
recording, defined by multiple lines in both time and frequency. This
geometry type is suitable for events that consist of multiple interesting
lines distributed across the spectrogram. MultiLineString
allows
researchers to identify and map several distinct lines within an event,
providing a detailed representation for complex acoustic patterns, such as
events with multiple harmonics.
Attributes:
Name | Type | Description |
---|---|---|
type |
MultiLineStringName
|
The type of geometry, always set to "MultiLineString," indicating the specific geometry type being utilized. This attribute ensures clear identification of the geometry representation and its intended purpose. |
coordinates |
List[List[List[float]]]
|
The lines of the sound event, specifying the time and frequency
coordinates of each point in each line within the event. The
|
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
List[List[List[float]]]
|
|
type |
MultiLineStringName
|
|
MultiPolygon
#
Bases: BaseGeometry
MultiPolygon Geometry Class.
The MultiPolygon
class represents sound events within an audio recording,
defined by multiple polygons in both time and frequency. This geometry type
is suitable for events that are split into multiple distinct polygons,
often due to occlusion by other sound events. MultiPolygon
enables the
identification and mapping of multiple separate regions within an event,
providing a detailed representation for complex acoustic patterns, such as
events occluded by others.
Attributes:
Name | Type | Description |
---|---|---|
type |
MultiPolygonName
|
The type of geometry, always set to "MultiPolygon," indicating the specific geometry type being utilized. This attribute ensures clear identification of the geometry representation and its intended purpose. |
coordinates |
List[List[List[List[float]]]]
|
The polygons of the sound event, specifying the time and frequency
coordinates for each point in each polygon within the event. The
|
Attributes:
Name | Type | Description |
---|---|---|
coordinates |
List[List[List[List[float]]]]
|
|
type |
MultiPolygonName
|
|
Other#
soundevent.data.PathLike = Union[os.PathLike, str]
module-attribute
#
PathLike: A type alias for a path-like object.