Skip to content

Schemas

whombat.schemas

Schemas for Whombat data models.

The Whombat Python API returns these schemas to the user, and they are the main way that the user interacts with the data.

Schemas are defined using Pydantic, and are used to validate data before it is inserted into the database, and also to validate data before it is returned to the user.

Most database models have multiple schemas, a main schema that is used to return data to the user, and a create and update schema that is used to validate data before it is inserted into the database.

Modules:

Name Description
annotation_projects

Schemas for Annotation Projects.

annotation_tasks

Schemas for annotation tasks.

audio

Schemas for spectrograms.

base

Base class to use for all schemas in whombat.

clip_annotations

Schemas for Clip Annotations related objects.

clip_evaluations

Schemas for Clip Evaluation related objects.

clip_predictions

Schemas for Clip Prediction related objects.

clips

Schemas for handling clips.

datasets

Schemas for handling Datasets.

evaluation_sets

Schemas for handling Evaluation Sets.

evaluations

Schemas for Evaluations.

features

Schemas for handling Features.

model_runs

Schemas for handling Prediction Runs.

notes

Schemas for handling Notes.

plugin

Schemas for handling Plugin information.

recordings

Schemas for handling Recordings.

sound_event_annotations

Schemas for Sound Event Annotation related objects.

sound_event_evaluations

Schemas for Sound Event Evaluation related objects.

sound_event_predictions

Schemas for Sound Event Predictions related objects.

sound_events

Schemas for sound events.

spectrograms

Schemas for spectrograms.

tags

Schemas for handling Tags.

user_runs

Schemas for handling User Runs.

users

Schemas for User objects.

Classes:

Name Description
AmplitudeParameters

Parameters for amplitude clamping.

AnnotationProject

Schema for an annotation project.

AnnotationProjectCreate

Schema for creating an annotation project.

AnnotationProjectUpdate

Schema for updating an annotation project.

AnnotationStatusBadge

Schema for a task status badge.

AnnotationStatusBadgeUpdate

Schema for updating a task status badge.

AnnotationTask

Schema for a task.

AnnotationTaskCreate

Schema for creating a new task.

AnnotationTaskNote

Schema for a task note.

AnnotationTaskUpdate

Schema for updating a task.

AudioParameters

Parameters for audio loading.

BaseSchema

Base class for all schemas in whombat.

Clip

Schema for Clip objects returned to the user.

ClipAnnotation

Schema for an ClipAnnotation.

ClipAnnotationCreate

Schema for data required to create an ClipAnnotation.

ClipAnnotationNote

Schema for a ClipAnnotationNote.

ClipAnnotationTag

Schema for an ClipAnnotationTag.

ClipAnnotationUpdate

Schema for data required to update an ClipAnnotation.

ClipCreate

Schema for creating a clip.

ClipEvaluation
ClipEvaluationCreate

Schema for creating a new Clip Evaluation.

ClipEvaluationUpdate

Schema for updating an existing Clip Evaluation.

ClipPrediction

Schema for a clip prediction.

ClipPredictionCreate

Schema for creating a new clip prediction.

ClipPredictionTag

Schema for a clip prediction tag.

ClipPredictionUpdate

Schema for updating a clip prediction.

ClipUpdate

Schema for updating a clip.

Dataset

Schema for Dataset objects returned to the user.

DatasetCreate

Schema for Dataset objects created by the user.

DatasetFile

Schema for DatasetFile objects returned to the user.

DatasetRecording

Schema for DatasetRecording objects returned to the user.

DatasetRecordingCreate

Schema for DatasetRecording objects created by the user.

DatasetUpdate

Schema for Dataset objects updated by the user.

Evaluation

Evaluation schema.

EvaluationCreate

Evaluation creation schema.

EvaluationSet

Schema for EvaluationSet objects returned to the user.

EvaluationSetCreate

Schema for creating EvaluationSet objects.

EvaluationSetUpdate

Schema for updating EvaluationSet objects.

EvaluationUpdate

Evaluation update schema.

Feature

Schema for Feature objects returned to the user.

FeatureName

Schema for FeatureName objects returned to the user.

FeatureNameCreate

Schema for FeatureName objects created by the user.

FeatureNameUpdate

Schema for FeatureName objects updated by the user.

FileState

The state of a file in a dataset.

ModelRun

Schema of a model run as returned to the user.

ModelRunCreate

Model Run creation schema.

ModelRunUpdate

Model Run update schema.

Note

Schema for Note objects returned to the user.

NoteCreate

Schema for creating notes.

NoteUpdate

Schema for updating notes.

Page

A page of results.

PluginInfo

Plugin information.

PredictedTag

Schema for PredictedTag objects returned to the user.

Recording

Schema for Recording objects returned to the user.

RecordingCreate

Data for Recording creation.

RecordingNote

Schema for RecordingNote objects.

RecordingTag

Schema for RecordingTag objects.

RecordingUpdate

Schema for Recording objects updated by the user.

STFTParameters

Parameters for STFT computation.

SimpleUser

Schema for User objects returned to the user.

SoundEvent

Public schema for handling sound events.

SoundEventAnnotation

Schema for an SoundEventAnnotation.

SoundEventAnnotationCreate

Schema for data required to create an SoundEventAnnotation.

SoundEventAnnotationNote

Schema for a SoundEventAnnotationNote.

SoundEventAnnotationTag

Schema for a SoundEventAnnotationTag.

SoundEventAnnotationUpdate

Schema for data required to update an SoundEventAnnotation.

SoundEventCreate

Schema for SoundEvent objects created by the user.

SoundEventEvaluation

Schema for a sound event evaluation.

SoundEventEvaluationCreate

Schema for creating a new sound event evaluation.

SoundEventEvaluationUpdate

Schema for updating a sound event evaluation.

SoundEventPrediction

Schema for a sound event prediction.

SoundEventPredictionCreate

Schema for creating a new sound event prediction.

SoundEventPredictionTag

Schema for a sound event prediction tag.

SoundEventPredictionUpdate

Schema for updating a sound event prediction.

SoundEventUpdate

Schema for SoundEvent objects updated by the user.

SpectrogramParameters

Parameters for spectrogram computation.

Tag

Schema for Tag objects returned to the user.

TagCount

Schema for TagCount objects returned to the user.

TagCreate

Schema for creating Tag objects.

TagUpdate

Schema for updating Tag objects.

User

Schema for User objects returned to the user.

UserCreate

Schema for User objects created by the user.

UserRun

Schema of a user run as returned to the user.

UserRunCreate

Model Run creation schema.

UserRunUpdate

Schema for updating a user run.

UserUpdate

Schema for User objects updated by the user.

Attributes:

Name Type Description
Scale
Window

Attributes

Scale = Literal['amplitude', 'power', 'dB'] module-attribute

Window = Literal['boxcar', 'triang', 'bartlett', 'flattop', 'parzen', 'bohman', 'blackman', 'blackmanharris', 'nuttall', 'barthann', 'hamming', 'hann', 'kaiser'] module-attribute

Classes

AmplitudeParameters

Bases: BaseModel

Parameters for amplitude clamping.

Parameters:

Name Type Description Default
scale Literal['amplitude', 'power', 'dB']

Scale to use for spectrogram computation.

'dB'
clamp bool

Whether to clamp amplitude values.

False
min_dB float

Minimum amplitude value.

-100.0
max_dB float

Maximum amplitude value.

0
normalize bool

Whether to normalize spectrogram before amplitude scaling.

If True, the spectrogram will be normalized to the range [0, 1] before amplitude scaling. In particular dB values are relative to the maximum amplitude value in the spectrogram, and not the maximum possible amplitude value of the recorder.

This can have the effect of making the spectrogram appear noisier than it actually is, since the maximum amplitude value in the spectrogram may be much lower than the maximum possible amplitude value of the recorder.

Also, when visualizing spectrograms in clips, the amplitude scale will be relative to the maximum amplitude value in the clip, and not the maximum of the recording as a whole. This can make it difficult to compare amplitude levels across clips, and will create artificial seams between clips when visualizing spectrograms in recordings.

True

Methods:

Name Description
check_db_are_negative

Check that min_dB and max_dB are non positive.

check_min_dB_and_max_dB

Check that min_dB is less than max_dB.

Attributes:

Name Type Description
clamp bool

Whether to clamp amplitude values.

max_dB float

Maximum amplitude value.

min_dB float

Minimum amplitude value.

normalize bool

Whether to normalize spectrogram before amplitude scaling.

scale Scale

Scale to use for spectrogram computation.

Attributes
clamp = False class-attribute instance-attribute

Whether to clamp amplitude values.

max_dB = 0 class-attribute instance-attribute

Maximum amplitude value.

min_dB = -100.0 class-attribute instance-attribute

Minimum amplitude value.

normalize = True class-attribute instance-attribute

Whether to normalize spectrogram before amplitude scaling.

If True, the spectrogram will be normalized to the range [0, 1] before amplitude scaling. In particular dB values are relative to the maximum amplitude value in the spectrogram, and not the maximum possible amplitude value of the recorder.

This can have the effect of making the spectrogram appear noisier than it actually is, since the maximum amplitude value in the spectrogram may be much lower than the maximum possible amplitude value of the recorder.

Also, when visualizing spectrograms in clips, the amplitude scale will be relative to the maximum amplitude value in the clip, and not the maximum of the recording as a whole. This can make it difficult to compare amplitude levels across clips, and will create artificial seams between clips when visualizing spectrograms in recordings.

scale = 'dB' class-attribute instance-attribute

Scale to use for spectrogram computation.

Functions
check_db_are_negative(value) classmethod

Check that min_dB and max_dB are non positive.

check_min_dB_and_max_dB()

Check that min_dB is less than max_dB.

AnnotationProject

Bases: BaseSchema

Schema for an annotation project.

Parameters:

Name Type Description Default
uuid UUID

UUID of the annotation project.

required
id int

Database ID of the annotation project.

required
name str

Name of the annotation project.

required
description str

A description of the annotation project.

required
annotation_instructions str | None

Project instructions for annotating.

None
tags list[Tag]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
annotation_instructions str | None

Project instructions for annotating.

description str

A description of the annotation project.

id int

Database ID of the annotation project.

name str

Name of the annotation project.

tags list[Tag]

Tags to be used throughout the annotation project.

uuid UUID

UUID of the annotation project.

Attributes
annotation_instructions = None class-attribute instance-attribute

Project instructions for annotating.

description instance-attribute

A description of the annotation project.

id = Field(..., exclude=True) class-attribute instance-attribute

Database ID of the annotation project.

name instance-attribute

Name of the annotation project.

tags = Field(default_factory=list) class-attribute instance-attribute

Tags to be used throughout the annotation project.

uuid instance-attribute

UUID of the annotation project.

AnnotationProjectCreate

Bases: BaseModel

Schema for creating an annotation project.

Parameters:

Name Type Description Default
name str

Name of the annotation project.

required
description str

A description of the annotation project.

required
annotation_instructions str | None

Project instructions for annotating.

None

Attributes:

Name Type Description
annotation_instructions str | None

Project instructions for annotating.

description str

A description of the annotation project.

name str

Name of the annotation project.

Attributes
annotation_instructions = None class-attribute instance-attribute

Project instructions for annotating.

description instance-attribute

A description of the annotation project.

name instance-attribute

Name of the annotation project.

AnnotationProjectUpdate

Bases: BaseModel

Schema for updating an annotation project.

Parameters:

Name Type Description Default
name str | None

Name of the annotation project.

None
description str | None

A description of the annotation project.

None
annotation_instructions str | None

Project instructions for annotating.

None

Attributes:

Name Type Description
annotation_instructions str | None

Project instructions for annotating.

description str | None

A description of the annotation project.

name str | None

Name of the annotation project.

Attributes
annotation_instructions = None class-attribute instance-attribute

Project instructions for annotating.

description = None class-attribute instance-attribute

A description of the annotation project.

name = None class-attribute instance-attribute

Name of the annotation project.

AnnotationStatusBadge

Bases: BaseSchema

Schema for a task status badge.

Parameters:

Name Type Description Default
state AnnotationState

State of the task.

required
user SimpleUser | None

User to whom the status badge refers.

required

Attributes:

Name Type Description
state AnnotationState

State of the task.

user SimpleUser | None

User to whom the status badge refers.

Attributes
state instance-attribute

State of the task.

user instance-attribute

User to whom the status badge refers.

AnnotationStatusBadgeUpdate

Bases: BaseModel

Schema for updating a task status badge.

Parameters:

Name Type Description Default
state AnnotationState | None

State of the task.

None

Attributes:

Name Type Description
state AnnotationState | None

State of the task.

Attributes
state = None class-attribute instance-attribute

State of the task.

AnnotationTask

Bases: BaseSchema

Schema for a task.

Parameters:

Name Type Description Default
uuid UUID

UUID of the task.

required
id int

Database ID of the task.

required
status_badges list[AnnotationStatusBadge]

Status badges for the task.

required

Attributes:

Name Type Description
id int

Database ID of the task.

status_badges list[AnnotationStatusBadge]

Status badges for the task.

uuid UUID

UUID of the task.

Attributes
id = Field(..., exclude=True) class-attribute instance-attribute

Database ID of the task.

status_badges instance-attribute

Status badges for the task.

uuid instance-attribute

UUID of the task.

AnnotationTaskCreate

Bases: BaseModel

Schema for creating a new task.

AnnotationTaskNote

Bases: BaseSchema

Schema for a task note.

Parameters:

Name Type Description Default
note Note

Note attached to this annotation.

required
task_annotation_uuid UUID

UUID of the task annotation this note is attached to.

required

Attributes:

Name Type Description
note Note

Note attached to this annotation.

task_annotation_uuid UUID

UUID of the task annotation this note is attached to.

Attributes
note instance-attribute

Note attached to this annotation.

task_annotation_uuid instance-attribute

UUID of the task annotation this note is attached to.

AnnotationTaskUpdate

Bases: BaseModel

Schema for updating a task.

Parameters:

Name Type Description Default
uuid UUID | None
None

Attributes:

Name Type Description
uuid UUID | None
Attributes
uuid = None class-attribute instance-attribute

AudioParameters

Bases: ResamplingParameters, FilteringParameters

Parameters for audio loading.

BaseSchema

Bases: BaseModel

Base class for all schemas in whombat.

All schemas should inherit from this class, either directly or indirectly.

Parameters:

Name Type Description Default
created_on datetime
datetime.datetime(2025, 11, 2, 16, 33, 49, 23733, tzinfo=datetime.timezone.utc)

Attributes:

Name Type Description
created_on datetime
model_config
Attributes
created_on = Field(repr=False, default_factory=(lambda: datetime.datetime.now(datetime.timezone.utc))) class-attribute instance-attribute
model_config = ConfigDict(from_attributes=True) class-attribute instance-attribute

Clip

Bases: BaseSchema

Schema for Clip objects returned to the user.

Parameters:

Name Type Description Default
uuid UUID

The unique identifier of the clip.

required
id int

The database id of the clip.

required
start_time float

The start time of the clip.

required
end_time float

The end time of the clip.

required
recording Recording

Recording information for the clip.

required
features list[Feature]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
end_time float

The end time of the clip.

features list[Feature]

The features associated with the clip.

id int

The database id of the clip.

recording Recording

Recording information for the clip.

start_time float

The start time of the clip.

uuid UUID

The unique identifier of the clip.

Attributes
end_time instance-attribute

The end time of the clip.

features = Field(default_factory=list) class-attribute instance-attribute

The features associated with the clip.

id = Field(..., exclude=True) class-attribute instance-attribute

The database id of the clip.

recording instance-attribute

Recording information for the clip.

start_time instance-attribute

The start time of the clip.

uuid instance-attribute

The unique identifier of the clip.

ClipAnnotation

Bases: BaseSchema

Schema for an ClipAnnotation.

Parameters:

Name Type Description Default
uuid UUID
required
id int

Database ID of this annotation.

required
clip Clip

Clip this annotation is attached to.

required
notes list[Note]

Notes attached to this annotation.

<dynamic>
tags list[Tag]

Tags attached to this annotation.

<dynamic>
sound_events list[SoundEventAnnotation]

Annotated sound events attached to this clip.

<dynamic>

Attributes:

Name Type Description
clip Clip

Clip this annotation is attached to.

id int

Database ID of this annotation.

notes list[Note]
sound_events list[SoundEventAnnotation]
tags list[Tag]
uuid UUID
Attributes
clip instance-attribute

Clip this annotation is attached to.

id = Field(..., exclude=True) class-attribute instance-attribute

Database ID of this annotation.

notes = Field(default_factory=list, description='Notes attached to this annotation.') class-attribute instance-attribute
sound_events = Field(default_factory=list, description='Annotated sound events attached to this clip.') class-attribute instance-attribute
tags = Field(default_factory=list, description='Tags attached to this annotation.', alias_priority=10000) class-attribute instance-attribute
uuid instance-attribute

ClipAnnotationCreate

Bases: BaseModel

Schema for data required to create an ClipAnnotation.

Parameters:

Name Type Description Default
tags list[Tag]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
tags list[Tag]
Attributes
tags = Field(default_factory=list) class-attribute instance-attribute

ClipAnnotationNote

Bases: BaseSchema

Schema for a ClipAnnotationNote.

Parameters:

Name Type Description Default
note Note

Note attached to this annotation.

required
clip_annotation_uuid UUID

UUID of the ClipAnnotation this note is attached to.

required

Attributes:

Name Type Description
clip_annotation_uuid UUID

UUID of the ClipAnnotation this note is attached to.

note Note

Note attached to this annotation.

Attributes
clip_annotation_uuid instance-attribute

UUID of the ClipAnnotation this note is attached to.

note instance-attribute

Note attached to this annotation.

ClipAnnotationTag

Bases: BaseSchema

Schema for an ClipAnnotationTag.

Parameters:

Name Type Description Default
created_by SimpleUser | None

User who created this annotation tag.

required
tag Tag

Tag attached to this annotation.

required
clip_annotation_uuid UUID

UUID of the ClipAnnotation this tag is attached to.

required

Attributes:

Name Type Description
clip_annotation_uuid UUID

UUID of the ClipAnnotation this tag is attached to.

created_by SimpleUser | None

User who created this annotation tag.

tag Tag

Tag attached to this annotation.

Attributes
clip_annotation_uuid instance-attribute

UUID of the ClipAnnotation this tag is attached to.

created_by instance-attribute

User who created this annotation tag.

tag instance-attribute

Tag attached to this annotation.

ClipAnnotationUpdate

Bases: BaseSchema

Schema for data required to update an ClipAnnotation.

Parameters:

Name Type Description Default
uuid UUID | None

UUID of the annotation.

None

Attributes:

Name Type Description
uuid UUID | None

UUID of the annotation.

Attributes
uuid = None class-attribute instance-attribute

UUID of the annotation.

ClipCreate

Bases: BaseModel

Schema for creating a clip.

Parameters:

Name Type Description Default
start_time float

The start time of the clip.

required
end_time float

The end time of the clip.

required

Methods:

Name Description
validate_times

Validate that start_time < end_time.

Attributes:

Name Type Description
end_time float

The end time of the clip.

start_time float

The start time of the clip.

Attributes
end_time instance-attribute

The end time of the clip.

start_time instance-attribute

The start time of the clip.

Functions
validate_times(values)

Validate that start_time < end_time.

ClipEvaluation

Bases: BaseSchema

Parameters:

Name Type Description Default
uuid UUID

UUID of the Clip Evaluation.

required
id int

Database ID of the evaluation.

required
clip_annotation ClipAnnotation

Clip annotation used for the evaluation.

required
clip_prediction ClipPrediction

Clip prediction being evaluated.

required
sound_event_evaluations list[SoundEventEvaluation]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
metrics list[Feature]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
score float

Overall score of the evaluation.

required

Attributes:

Name Type Description
clip_annotation ClipAnnotation

Clip annotation used for the evaluation.

clip_prediction ClipPrediction

Clip prediction being evaluated.

id int

Database ID of the evaluation.

metrics list[Feature]

Evaluation metrics.

score float

Overall score of the evaluation.

sound_event_evaluations list[SoundEventEvaluation]

The evaluation of the sound events within the clip.

uuid UUID

UUID of the Clip Evaluation.

Attributes
clip_annotation instance-attribute

Clip annotation used for the evaluation.

clip_prediction instance-attribute

Clip prediction being evaluated.

id = Field(..., exclude=True) class-attribute instance-attribute

Database ID of the evaluation.

metrics = Field(default_factory=list) class-attribute instance-attribute

Evaluation metrics.

score instance-attribute

Overall score of the evaluation.

sound_event_evaluations = Field(default_factory=list) class-attribute instance-attribute

The evaluation of the sound events within the clip.

uuid instance-attribute

UUID of the Clip Evaluation.

ClipEvaluationCreate

Bases: BaseModel

Schema for creating a new Clip Evaluation.

Parameters:

Name Type Description Default
score float

Overall score of the evaluation.

required

Attributes:

Name Type Description
score float

Overall score of the evaluation.

Attributes
score instance-attribute

Overall score of the evaluation.

ClipEvaluationUpdate

Bases: BaseModel

Schema for updating an existing Clip Evaluation.

Parameters:

Name Type Description Default
score float | None

Overall score of the evaluation.

None
uuid UUID | None

UUID of the Clip Evaluation.

None

Attributes:

Name Type Description
score float | None

Overall score of the evaluation.

uuid UUID | None

UUID of the Clip Evaluation.

Attributes
score = None class-attribute instance-attribute

Overall score of the evaluation.

uuid = None class-attribute instance-attribute

UUID of the Clip Evaluation.

ClipPrediction

Bases: BaseSchema

Schema for a clip prediction.

Parameters:

Name Type Description Default
uuid UUID

UUID of the prediction.

required
id int

Database ID of the prediction.

required
clip Clip

Clip to which this prediction belongs.

required
sound_events list[SoundEventPrediction]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
tags list[ClipPredictionTag]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
clip Clip

Clip to which this prediction belongs.

id int

Database ID of the prediction.

sound_events list[SoundEventPrediction]

Sound event predictions of the clip.

tags list[ClipPredictionTag]

Tags of the prediction.

uuid UUID

UUID of the prediction.

Attributes
clip instance-attribute

Clip to which this prediction belongs.

id = Field(..., exclude=True) class-attribute instance-attribute

Database ID of the prediction.

sound_events = Field(default_factory=list) class-attribute instance-attribute

Sound event predictions of the clip.

tags = Field(default_factory=list) class-attribute instance-attribute

Tags of the prediction.

uuid instance-attribute

UUID of the prediction.

ClipPredictionCreate

Bases: BaseModel

Schema for creating a new clip prediction.

Parameters:

Name Type Description Default
tags list[PredictedTag]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
tags list[PredictedTag]

Tags of the prediction.

Attributes
tags = Field(default_factory=list) class-attribute instance-attribute

Tags of the prediction.

ClipPredictionTag

Bases: BaseSchema

Schema for a clip prediction tag.

Parameters:

Name Type Description Default
tag Tag

Tag of the prediction.

required
score float

Confidence of the prediction.

required

Attributes:

Name Type Description
score float

Confidence of the prediction.

tag Tag

Tag of the prediction.

Attributes
score instance-attribute

Confidence of the prediction.

tag instance-attribute

Tag of the prediction.

ClipPredictionUpdate

Bases: BaseModel

Schema for updating a clip prediction.

Parameters:

Name Type Description Default
uuid UUID | None

UUID of the prediction.

None

Attributes:

Name Type Description
uuid UUID | None

UUID of the prediction.

Attributes
uuid = None class-attribute instance-attribute

UUID of the prediction.

ClipUpdate

Bases: BaseModel

Schema for updating a clip.

Parameters:

Name Type Description Default
uuid UUID | None

The unique identifier of the clip.

None

Attributes:

Name Type Description
uuid UUID | None

The unique identifier of the clip.

Attributes
uuid = None class-attribute instance-attribute

The unique identifier of the clip.

Dataset

Bases: BaseSchema

Schema for Dataset objects returned to the user.

Parameters:

Name Type Description Default
uuid UUID

The uuid of the dataset.

required
id int

The database id of the dataset.

required
audio_dir Path

The path to the directory containing the audio files.

required
name str

The name of the dataset.

required
description str | None

The description of the dataset.

required
recording_count int

The number of recordings in the dataset.

0

Attributes:

Name Type Description
audio_dir Path

The path to the directory containing the audio files.

description str | None

The description of the dataset.

id int

The database id of the dataset.

name str

The name of the dataset.

recording_count int

The number of recordings in the dataset.

uuid UUID

The uuid of the dataset.

Attributes
audio_dir instance-attribute

The path to the directory containing the audio files.

description instance-attribute

The description of the dataset.

id = Field(..., exclude=True) class-attribute instance-attribute

The database id of the dataset.

name instance-attribute

The name of the dataset.

recording_count = 0 class-attribute instance-attribute

The number of recordings in the dataset.

uuid instance-attribute

The uuid of the dataset.

DatasetCreate

Bases: BaseModel

Schema for Dataset objects created by the user.

Parameters:

Name Type Description Default
audio_dir Path

The path to the directory containing the audio files.

required
name str

The name of the dataset.

required
description str | None

The description of the dataset.

None

Attributes:

Name Type Description
audio_dir DirectoryPath

The path to the directory containing the audio files.

description str | None

The description of the dataset.

name str

The name of the dataset.

Attributes
audio_dir instance-attribute

The path to the directory containing the audio files.

description = Field(None) class-attribute instance-attribute

The description of the dataset.

name = Field(..., min_length=1) class-attribute instance-attribute

The name of the dataset.

DatasetFile

Bases: BaseModel

Schema for DatasetFile objects returned to the user.

Parameters:

Name Type Description Default
path Path

The path to the file.

required
state FileState

The state of the file.

required

Attributes:

Name Type Description
path Path

The path to the file.

state FileState

The state of the file.

Attributes
path instance-attribute

The path to the file.

state instance-attribute

The state of the file.

DatasetRecording

Bases: BaseSchema

Schema for DatasetRecording objects returned to the user.

Parameters:

Name Type Description Default
recording Recording

The uuid of the recording.

required
state FileState

The state of the file.

<FileState.REGISTERED: 'registered'>
path Path

The path to the recording in the dataset directory.

required

Attributes:

Name Type Description
path Path

The path to the recording in the dataset directory.

recording Recording

The uuid of the recording.

state FileState

The state of the file.

Attributes
path instance-attribute

The path to the recording in the dataset directory.

recording instance-attribute

The uuid of the recording.

state = Field(default=(FileState.REGISTERED)) class-attribute instance-attribute

The state of the file.

DatasetRecordingCreate

Bases: BaseModel

Schema for DatasetRecording objects created by the user.

Parameters:

Name Type Description Default
path Path

The path to the recording in the dataset directory.

required

Attributes:

Name Type Description
path Path

The path to the recording in the dataset directory.

Attributes
path instance-attribute

The path to the recording in the dataset directory.

DatasetUpdate

Bases: BaseModel

Schema for Dataset objects updated by the user.

Parameters:

Name Type Description Default
audio_dir Annotated[Path, PathType] | None

The path to the directory containing the audio files.

None
name str | None

The name of the dataset.

None
description str | None

The description of the dataset.

None

Attributes:

Name Type Description
audio_dir DirectoryPath | None

The path to the directory containing the audio files.

description str | None

The description of the dataset.

name str | None

The name of the dataset.

Attributes
audio_dir = None class-attribute instance-attribute

The path to the directory containing the audio files.

description = None class-attribute instance-attribute

The description of the dataset.

name = Field(default=None, min_length=1) class-attribute instance-attribute

The name of the dataset.

Evaluation

Bases: BaseSchema

Evaluation schema.

Parameters:

Name Type Description Default
uuid UUID
required
id int

Dataset identifier of the evaluation.

required
score float

Overall score of the evaluation.

required
task str

Task of the evaluation.

required
metrics list[Feature]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
id int

Dataset identifier of the evaluation.

metrics list[Feature]

List of metrics of the evaluation.

score float

Overall score of the evaluation.

task str

Task of the evaluation.

uuid UUID
Attributes
id = Field(..., exclude=True) class-attribute instance-attribute

Dataset identifier of the evaluation.

metrics = Field(default_factory=list) class-attribute instance-attribute

List of metrics of the evaluation.

score instance-attribute

Overall score of the evaluation.

task instance-attribute

Task of the evaluation.

uuid instance-attribute

EvaluationCreate

Bases: BaseModel

Evaluation creation schema.

Parameters:

Name Type Description Default
score float

Overall score of the evaluation.

0
task str

Task of the evaluation.

required

Attributes:

Name Type Description
score float

Overall score of the evaluation.

task str

Task of the evaluation.

Attributes
score = Field(default=0, ge=0, le=1) class-attribute instance-attribute

Overall score of the evaluation.

task instance-attribute

Task of the evaluation.

EvaluationSet

Bases: BaseSchema

Schema for EvaluationSet objects returned to the user.

Parameters:

Name Type Description Default
uuid UUID

The uuid of the evaluation set.

required
id int

The id of the evaluation set.

required
name str

The name of the evaluation set.

required
description str | None

The description of the evaluation set.

required
task PredictionTypes

The name of the task the evaluation set is used for.

required
tags list[Tag]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
description str | None

The description of the evaluation set.

id int

The id of the evaluation set.

name str

The name of the evaluation set.

tags list[Tag]

The tags to use for the evaluation set.

task PredictionTypes

The name of the task the evaluation set is used for.

uuid UUID

The uuid of the evaluation set.

Attributes
description instance-attribute

The description of the evaluation set.

id = Field(..., exclude=True) class-attribute instance-attribute

The id of the evaluation set.

name instance-attribute

The name of the evaluation set.

tags = Field(default_factory=list) class-attribute instance-attribute

The tags to use for the evaluation set.

task instance-attribute

The name of the task the evaluation set is used for.

uuid instance-attribute

The uuid of the evaluation set.

EvaluationSetCreate

Bases: BaseModel

Schema for creating EvaluationSet objects.

Parameters:

Name Type Description Default
name str

The name of the evaluation set.

required
description str | None

The description of the evaluation set.

None
task PredictionTypes

The name of the task the evaluation set is used for.

required

Attributes:

Name Type Description
description str | None

The description of the evaluation set.

name str

The name of the evaluation set.

task PredictionTypes

The name of the task the evaluation set is used for.

Attributes
description = Field(default=None) class-attribute instance-attribute

The description of the evaluation set.

name = Field(..., min_length=1) class-attribute instance-attribute

The name of the evaluation set.

task = Field(..., min_length=1) class-attribute instance-attribute

The name of the task the evaluation set is used for.

EvaluationSetUpdate

Bases: BaseModel

Schema for updating EvaluationSet objects.

Parameters:

Name Type Description Default
name str | None

The name of the evaluation set.

None
description str | None

The description of the evaluation set.

None

Attributes:

Name Type Description
description str | None

The description of the evaluation set.

name str | None

The name of the evaluation set.

Attributes
description = None class-attribute instance-attribute

The description of the evaluation set.

name = Field(default=None, min_length=1) class-attribute instance-attribute

The name of the evaluation set.

EvaluationUpdate

Bases: BaseModel

Evaluation update schema.

Parameters:

Name Type Description Default
uuid UUID | None

Unique identifier of the evaluation.

None
score float | None

Overall score of the evaluation.

None
task str | None

Task of the evaluation.

None

Attributes:

Name Type Description
score float | None

Overall score of the evaluation.

task str | None

Task of the evaluation.

uuid UUID | None

Unique identifier of the evaluation.

Attributes
score = None class-attribute instance-attribute

Overall score of the evaluation.

task = None class-attribute instance-attribute

Task of the evaluation.

uuid = None class-attribute instance-attribute

Unique identifier of the evaluation.

Feature

Bases: BaseModel

Schema for Feature objects returned to the user.

Parameters:

Name Type Description Default
name str

The name of the feature.

required
value float

The value of the feature.

required

Attributes:

Name Type Description
model_config
name str

The name of the feature.

value float

The value of the feature.

Attributes
model_config = ConfigDict(from_attributes=True) class-attribute instance-attribute
name instance-attribute

The name of the feature.

value instance-attribute

The value of the feature.

FeatureName

Bases: BaseSchema

Schema for FeatureName objects returned to the user.

Parameters:

Name Type Description Default
id int

The database id of the feature name.

required
name str

The name of the feature.

required

Attributes:

Name Type Description
id int

The database id of the feature name.

name str

The name of the feature.

Attributes
id = Field(..., exclude=True) class-attribute instance-attribute

The database id of the feature name.

name instance-attribute

The name of the feature.

FeatureNameCreate

Bases: BaseModel

Schema for FeatureName objects created by the user.

Parameters:

Name Type Description Default
name str

The name of the feature.

required

Attributes:

Name Type Description
name str

The name of the feature.

Attributes
name instance-attribute

The name of the feature.

FeatureNameUpdate

Bases: BaseModel

Schema for FeatureName objects updated by the user.

Parameters:

Name Type Description Default
name str

The name of the feature.

required

Attributes:

Name Type Description
name str

The name of the feature.

Attributes
name instance-attribute

The name of the feature.

FileState

Bases: Enum

The state of a file in a dataset.

Datasets can contain files that are not registered in the database. This can happen if the file was added to the dataset directory after the dataset was registered. Additionally, files can be registered in the database but missing from the dataset directory. This can happen if the file was removed from the dataset directory after the dataset was registered.

The state of a file can be one of the following:

  • missing: The file is not registered in the database and is missing.

  • registered: The file is registered in the database and is present.

  • unregistered: The file is not registered in the database but is present in the dataset directory.

Attributes:

Name Type Description
MISSING

If the recording is registered but the file is missing.

REGISTERED

If the recording is registered and the file is present.

UNREGISTERED

If the recording is not registered but the file is present.

Attributes
MISSING = 'missing' class-attribute instance-attribute

If the recording is registered but the file is missing.

REGISTERED = 'registered' class-attribute instance-attribute

If the recording is registered and the file is present.

UNREGISTERED = 'unregistered' class-attribute instance-attribute

If the recording is not registered but the file is present.

ModelRun

Bases: ModelRunCreate

Schema of a model run as returned to the user.

Parameters:

Name Type Description Default
uuid UUID

The unique identifier of the model run.

required
id int

The database identifier of the model run.

required

Attributes:

Name Type Description
id int

The database identifier of the model run.

uuid UUID

The unique identifier of the model run.

Attributes
id = Field(..., exclude=True) class-attribute instance-attribute

The database identifier of the model run.

uuid instance-attribute

The unique identifier of the model run.

ModelRunCreate

Bases: BaseSchema

Model Run creation schema.

Parameters:

Name Type Description Default
name str

Name of the model used to generate the model run.

required
version str

Version of the model used to generate the model run.

required
description str | None

A description of the model used to generate the model run.

None

Attributes:

Name Type Description
description str | None

A description of the model used to generate the model run.

name str

Name of the model used to generate the model run.

version str

Version of the model used to generate the model run.

Attributes
description = None class-attribute instance-attribute

A description of the model used to generate the model run.

name instance-attribute

Name of the model used to generate the model run.

version instance-attribute

Version of the model used to generate the model run.

ModelRunUpdate

Bases: BaseSchema

Model Run update schema.

Parameters:

Name Type Description Default
name str | None

The name of the model used to generate the model run.

None
version str | None

The version of the model used to generate the model run.

None
description str | None

The description of the model used to generate the model run.

None

Attributes:

Name Type Description
description str | None

The description of the model used to generate the model run.

name str | None

The name of the model used to generate the model run.

version str | None

The version of the model used to generate the model run.

Attributes
description = None class-attribute instance-attribute

The description of the model used to generate the model run.

name = None class-attribute instance-attribute

The name of the model used to generate the model run.

version = None class-attribute instance-attribute

The version of the model used to generate the model run.

Note

Bases: BaseSchema

Schema for Note objects returned to the user.

Parameters:

Name Type Description Default
uuid UUID

The uuid of the note.

required
id int

The database id of the note.

required
message str

The message of the note.

required
is_issue bool

Whether the note is an issue.

required
created_by SimpleUser | None

The user who created the note.

required

Attributes:

Name Type Description
created_by SimpleUser | None

The user who created the note.

id int

The database id of the note.

is_issue bool

Whether the note is an issue.

message str

The message of the note.

uuid UUID

The uuid of the note.

Attributes
created_by instance-attribute

The user who created the note.

id = Field(..., exclude=True) class-attribute instance-attribute

The database id of the note.

is_issue instance-attribute

Whether the note is an issue.

message instance-attribute

The message of the note.

uuid instance-attribute

The uuid of the note.

NoteCreate

Bases: BaseModel

Schema for creating notes.

This schema is used when creating notes from the API as the user does not need to provide the id of the user who created the note.

Parameters:

Name Type Description Default
message str
required
is_issue bool
False

Attributes:

Name Type Description
is_issue bool
message str
Attributes
is_issue = False class-attribute instance-attribute
message = Field(min_length=1, max_length=1000) class-attribute instance-attribute

NoteUpdate

Bases: BaseModel

Schema for updating notes.

Parameters:

Name Type Description Default
message str | None

The message of the note.

None
is_issue bool | None

Whether the note is an issue.

None

Attributes:

Name Type Description
is_issue bool | None

Whether the note is an issue.

message str | None

The message of the note.

Attributes
is_issue = None class-attribute instance-attribute

Whether the note is an issue.

message = Field(None, min_length=1, max_length=1000) class-attribute instance-attribute

The message of the note.

Page

Bases: BaseModel, Generic[M]

A page of results.

Parameters:

Name Type Description Default
items Sequence[M]
required
total int
required
offset int
required
limit int
required

Attributes:

Name Type Description
items Sequence[M]
limit int
offset int
total int
Attributes
items instance-attribute
limit instance-attribute
offset instance-attribute
total instance-attribute

PluginInfo

Bases: BaseModel

Plugin information.

Parameters:

Name Type Description Default
name str

Plugin name.

required
url str

Route to the plugin pages.

required
description str | None

Plugin description.

None
version str | None

Plugin version.

None
thumbnail str | None

Plugin thumbnail.

None
attribution str | None

Plugin attribution.

None

Attributes:

Name Type Description
attribution str | None
description str | None
name str
thumbnail str | None
url str
version str | None
Attributes
attribution = Field(default=None, description='Plugin attribution.') class-attribute instance-attribute
description = Field(default=None, description='Plugin description.') class-attribute instance-attribute
name = Field(..., description='Plugin name.') class-attribute instance-attribute
thumbnail = Field(default=None, description='Plugin thumbnail.') class-attribute instance-attribute
url = Field(..., description='Route to the plugin pages.') class-attribute instance-attribute
version = Field(default=None, description='Plugin version.') class-attribute instance-attribute

PredictedTag

Bases: BaseSchema

Schema for PredictedTag objects returned to the user.

Parameters:

Name Type Description Default
tag Tag

The tag that was predicted.

required
score float

The confidence score for the assignment of the tag.

required

Attributes:

Name Type Description
score float

The confidence score for the assignment of the tag.

tag Tag

The tag that was predicted.

Attributes
score instance-attribute

The confidence score for the assignment of the tag.

tag instance-attribute

The tag that was predicted.

Recording

Bases: BaseSchema

Schema for Recording objects returned to the user.

Parameters:

Name Type Description Default
uuid UUID

The UUID of the recording.

required
id int

The database id of the recording.

required
path Path

The path to the audio file, relative to the audio directory.

required
date date | None

The date of the recording.

required
time time | None

The time of the recording.

required
latitude float | None

The latitude of the recording.

required
longitude float | None

The longitude of the recording.

required
time_expansion float

The time expansion factor of the recording.

required
hash str

The md5 hash of the audio file.

required
duration float

The duration of the audio file in seconds.

This is the duration of the original audio file, not the time expanded version. This can vary depending on the time expansion factor. If the stored file has a duration of 10 seconds and a time expansion factor is 2, this means that the original recording was 5 seconds long. So the duration of the original recording is 5 seconds, not 10.

required
channels int

The number of channels in the audio file.

required
samplerate int

The sample rate of the audio file in Hz.

This is the sample rate of the original audio file, not the time expanded version. This can vary depending on the time expansion factor. If the stored file has a sample rate of 44100 Hz and a time expansion factor is 2, this means that the original recording had a sample rate of 88200 Hz. So the sample rate of the original recording is 88200 Hz, not 44100 Hz.

required
rights str | None

A text describing the usage rights of the recording.

required
tags list[Tag]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
features list[Feature]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
notes list[Note]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
owners list[SimpleUser]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
channels int

The number of channels in the audio file.

date date | None

The date of the recording.

duration float

The duration of the audio file in seconds.

features list[Feature]

The features associated with the recording.

hash str

The md5 hash of the audio file.

id int

The database id of the recording.

latitude float | None

The latitude of the recording.

longitude float | None

The longitude of the recording.

notes list[Note]

The notes associated with the recording.

owners list[SimpleUser]

The users that own the recording.

path Path

The path to the audio file, relative to the audio directory.

rights str | None

A text describing the usage rights of the recording.

samplerate int

The sample rate of the audio file in Hz.

tags list[Tag]

The tags associated with the recording.

time time | None

The time of the recording.

time_expansion float

The time expansion factor of the recording.

uuid UUID

The UUID of the recording.

Attributes
channels instance-attribute

The number of channels in the audio file.

date instance-attribute

The date of the recording.

duration instance-attribute

The duration of the audio file in seconds.

This is the duration of the original audio file, not the time expanded version. This can vary depending on the time expansion factor. If the stored file has a duration of 10 seconds and a time expansion factor is 2, this means that the original recording was 5 seconds long. So the duration of the original recording is 5 seconds, not 10.

features = Field(default_factory=list) class-attribute instance-attribute

The features associated with the recording.

hash instance-attribute

The md5 hash of the audio file.

id = Field(..., exclude=True) class-attribute instance-attribute

The database id of the recording.

latitude instance-attribute

The latitude of the recording.

longitude instance-attribute

The longitude of the recording.

notes = Field(default_factory=list) class-attribute instance-attribute

The notes associated with the recording.

owners = Field(default_factory=list) class-attribute instance-attribute

The users that own the recording.

path instance-attribute

The path to the audio file, relative to the audio directory.

rights instance-attribute

A text describing the usage rights of the recording.

samplerate instance-attribute

The sample rate of the audio file in Hz.

This is the sample rate of the original audio file, not the time expanded version. This can vary depending on the time expansion factor. If the stored file has a sample rate of 44100 Hz and a time expansion factor is 2, this means that the original recording had a sample rate of 88200 Hz. So the sample rate of the original recording is 88200 Hz, not 44100 Hz.

tags = Field(default_factory=list) class-attribute instance-attribute

The tags associated with the recording.

time instance-attribute

The time of the recording.

time_expansion instance-attribute

The time expansion factor of the recording.

uuid instance-attribute

The UUID of the recording.

RecordingCreate

Bases: BaseModel

Data for Recording creation.

Parameters:

Name Type Description Default
date date | None

The date of the recording.

None
time time | None

The time of the recording.

None
latitude float | None

The latitude of the recording.

None
longitude float | None

The longitude of the recording.

None
time_expansion float

The time expansion factor of the recording.

1.0
rights str | None

A text describing the usage rights of the recording.

None
path Path

The path to the audio file.

required

Methods:

Name Description
is_an_audio_file

Validate that the given path is an audio file.

Attributes:

Name Type Description
date date | None

The date of the recording.

latitude float | None

The latitude of the recording.

longitude float | None

The longitude of the recording.

path FilePath

The path to the audio file.

rights str | None

A text describing the usage rights of the recording.

time time | None

The time of the recording.

time_expansion float

The time expansion factor of the recording.

Attributes
date = None class-attribute instance-attribute

The date of the recording.

latitude = Field(default=None, ge=(-90), le=90) class-attribute instance-attribute

The latitude of the recording.

longitude = Field(default=None, ge=(-180), le=180) class-attribute instance-attribute

The longitude of the recording.

path instance-attribute

The path to the audio file.

rights = None class-attribute instance-attribute

A text describing the usage rights of the recording.

time = None class-attribute instance-attribute

The time of the recording.

time_expansion = Field(default=1.0, gt=0) class-attribute instance-attribute

The time expansion factor of the recording.

Functions
is_an_audio_file(v)

Validate that the given path is an audio file.

RecordingNote

Bases: BaseSchema

Schema for RecordingNote objects.

Parameters:

Name Type Description Default
recording_uuid UUID
required
note Note
required

Attributes:

Name Type Description
note Note
recording_uuid UUID
Attributes
note instance-attribute
recording_uuid instance-attribute

RecordingTag

Bases: BaseSchema

Schema for RecordingTag objects.

Parameters:

Name Type Description Default
recording_uuid UUID

The UUID of the recording.

required
tag Tag

The tag associated with the recording.

required

Attributes:

Name Type Description
recording_uuid UUID

The UUID of the recording.

tag Tag

The tag associated with the recording.

Attributes
recording_uuid instance-attribute

The UUID of the recording.

tag instance-attribute

The tag associated with the recording.

RecordingUpdate

Bases: BaseModel

Schema for Recording objects updated by the user.

Parameters:

Name Type Description Default
date date | None

The date of the recording.

None
time time | None

The time of the recording.

None
latitude float | None

The latitude of the recording.

None
longitude float | None

The longitude of the recording.

None
path Annotated[Path, PathType] | None

New path to the audio file.

None
time_expansion float | None

New time expansion factor of the recording.

None
rights str | None

A text describing the usage rights of the recording.

None

Attributes:

Name Type Description
date date | None

The date of the recording.

latitude float | None

The latitude of the recording.

longitude float | None

The longitude of the recording.

path FilePath | None

New path to the audio file.

rights str | None

A text describing the usage rights of the recording.

time time | None

The time of the recording.

time_expansion float | None

New time expansion factor of the recording.

Attributes
date = None class-attribute instance-attribute

The date of the recording.

latitude = Field(default=None, ge=(-90), le=90) class-attribute instance-attribute

The latitude of the recording.

longitude = Field(default=None, ge=(-180), le=180) class-attribute instance-attribute

The longitude of the recording.

path = None class-attribute instance-attribute

New path to the audio file.

rights = None class-attribute instance-attribute

A text describing the usage rights of the recording.

time = None class-attribute instance-attribute

The time of the recording.

time_expansion = Field(default=None, gt=0) class-attribute instance-attribute

New time expansion factor of the recording.

STFTParameters

Bases: BaseModel

Parameters for STFT computation.

Parameters:

Name Type Description Default
window_size float

Size of FFT window in seconds.

0.025
overlap float

Window overlap as a fraction of window size.

0.5
window Literal['boxcar', 'triang', 'bartlett', 'flattop', 'parzen', 'bohman', 'blackman', 'blackmanharris', 'nuttall', 'barthann', 'hamming', 'hann', 'kaiser']

Window function.

'hann'

Methods:

Name Description
check_positive

Check that window size and hop size are positive.

Attributes:

Name Type Description
overlap float

Window overlap as a fraction of window size.

window Window

Window function.

window_size float

Size of FFT window in seconds.

Attributes
overlap = Field(default=0.5, gt=0.0, le=1.0) class-attribute instance-attribute

Window overlap as a fraction of window size.

window = 'hann' class-attribute instance-attribute

Window function.

window_size = 0.025 class-attribute instance-attribute

Size of FFT window in seconds.

Functions
check_positive(value) classmethod

Check that window size and hop size are positive.

SimpleUser

Bases: BaseSchema

Schema for User objects returned to the user.

Parameters:

Name Type Description Default
id UUID
required
username str
required
email EmailStr | None
None
name str | None
None
is_active bool | None
False
is_superuser bool | None
False
is_verified bool | None
False

Attributes:

Name Type Description
email EmailStr | None
id UUID
is_active bool | None
is_superuser bool | None
is_verified bool | None
name str | None
username str
Attributes
email = None class-attribute instance-attribute
id instance-attribute
is_active = False class-attribute instance-attribute
is_superuser = False class-attribute instance-attribute
is_verified = False class-attribute instance-attribute
name = None class-attribute instance-attribute
username instance-attribute

SoundEvent

Bases: BaseSchema

Public schema for handling sound events.

Parameters:

Name Type Description Default
uuid UUID

The uuid of the sound event.

required
id int

The id of the sound event.

required
geometry TimeStamp | TimeInterval | Point | LineString | Polygon | BoundingBox | MultiPoint | MultiLineString | MultiPolygon
required
geometry_type Literal[TimeStamp] | Literal[TimeInterval] | Literal[BoundingBox] | Literal[Point] | Literal[LineString] | Literal[Polygon] | Literal[MultiPoint] | Literal[MultiLineString] | Literal[MultiPolygon]
required
features list[Feature]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
features list[Feature]

The features associated with the sound event.

geometry Geometry
geometry_type GeometryType
id int

The id of the sound event.

uuid UUID

The uuid of the sound event.

Attributes
features = Field(default_factory=list) class-attribute instance-attribute

The features associated with the sound event.

geometry = Field(..., discriminator='type') class-attribute instance-attribute
geometry_type instance-attribute
id = Field(..., exclude=True) class-attribute instance-attribute

The id of the sound event.

uuid instance-attribute

The uuid of the sound event.

SoundEventAnnotation

Bases: BaseSchema

Schema for an SoundEventAnnotation.

Parameters:

Name Type Description Default
uuid UUID

UUID of this annotation.

required
id int

Database ID of this annotation.

required
created_by SimpleUser | None

User who created this annotation.

required
sound_event SoundEvent

Sound event this annotation is attached to.

required
notes list[Note]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
tags list[Tag]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
created_by SimpleUser | None

User who created this annotation.

id int

Database ID of this annotation.

notes list[Note]

Notes attached to this annotation.

sound_event SoundEvent

Sound event this annotation is attached to.

tags list[Tag]

Tags attached to this annotation.

uuid UUID

UUID of this annotation.

Attributes
created_by instance-attribute

User who created this annotation.

id = Field(..., exclude=True) class-attribute instance-attribute

Database ID of this annotation.

notes = Field(default_factory=list) class-attribute instance-attribute

Notes attached to this annotation.

sound_event instance-attribute

Sound event this annotation is attached to.

tags = Field(default_factory=list) class-attribute instance-attribute

Tags attached to this annotation.

uuid instance-attribute

UUID of this annotation.

SoundEventAnnotationCreate

Bases: BaseModel

Schema for data required to create an SoundEventAnnotation.

Parameters:

Name Type Description Default
geometry TimeStamp | TimeInterval | Point | LineString | Polygon | BoundingBox | MultiPoint | MultiLineString | MultiPolygon

Geometry of this annotation.

required
tags list[TagCreate]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
geometry Geometry

Geometry of this annotation.

tags list[TagCreate]

Tags attached to this annotation.

Attributes
geometry = Field(..., discriminator='type') class-attribute instance-attribute

Geometry of this annotation.

tags = Field(default_factory=list) class-attribute instance-attribute

Tags attached to this annotation.

SoundEventAnnotationNote

Bases: BaseSchema

Schema for a SoundEventAnnotationNote.

Parameters:

Name Type Description Default
note Note

Note attached to this annotation.

required
sound_event_annotation_uuid UUID

UUID of the SoundEventAnnotation this note is attached to.

required

Attributes:

Name Type Description
note Note

Note attached to this annotation.

sound_event_annotation_uuid UUID

UUID of the SoundEventAnnotation this note is attached to.

Attributes
note instance-attribute

Note attached to this annotation.

sound_event_annotation_uuid instance-attribute

UUID of the SoundEventAnnotation this note is attached to.

SoundEventAnnotationTag

Bases: BaseSchema

Schema for a SoundEventAnnotationTag.

Parameters:

Name Type Description Default
tag Tag

Tag attached to this annotation.

required
created_by SimpleUser | None

User who created this annotation.

required
sound_event_annotation_uuid UUID

UUID of the SoundEventAnnotation this tag is attached to.

required

Attributes:

Name Type Description
created_by SimpleUser | None

User who created this annotation.

sound_event_annotation_uuid UUID

UUID of the SoundEventAnnotation this tag is attached to.

tag Tag

Tag attached to this annotation.

Attributes
created_by instance-attribute

User who created this annotation.

sound_event_annotation_uuid instance-attribute

UUID of the SoundEventAnnotation this tag is attached to.

tag instance-attribute

Tag attached to this annotation.

SoundEventAnnotationUpdate

Bases: BaseSchema

Schema for data required to update an SoundEventAnnotation.

Parameters:

Name Type Description Default
geometry TimeStamp | TimeInterval | Point | LineString | Polygon | BoundingBox | MultiPoint | MultiLineString | MultiPolygon

Geometry of this annotation.

required

Attributes:

Name Type Description
geometry Geometry

Geometry of this annotation.

Attributes
geometry = Field(..., discriminator='type') class-attribute instance-attribute

Geometry of this annotation.

SoundEventCreate

Bases: BaseModel

Schema for SoundEvent objects created by the user.

Parameters:

Name Type Description Default
geometry TimeStamp | TimeInterval | Point | LineString | Polygon | BoundingBox | MultiPoint | MultiLineString | MultiPolygon

The geometry of the sound event.

required

Attributes:

Name Type Description
geometry Geometry

The geometry of the sound event.

geometry_type GeometryType

Return the type of geometry used to mark the sound event.

Attributes
geometry = Field(..., discriminator='type') class-attribute instance-attribute

The geometry of the sound event.

geometry_type property

Return the type of geometry used to mark the sound event.

SoundEventEvaluation

Bases: BaseSchema

Schema for a sound event evaluation.

Parameters:

Name Type Description Default
uuid UUID
required
id int

Database ID of the evaluation.

required
source SoundEventPrediction | None

Source sound event prediction.

required
target SoundEventAnnotation | None

Target sound event annotation.

required
affinity float

Affinity of the match between the source and target.

required
score float

Overall score of the evaluation.

required
metrics list[Feature]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
affinity float

Affinity of the match between the source and target.

id int

Database ID of the evaluation.

metrics list[Feature]

Evaluation metrics.

score float

Overall score of the evaluation.

source SoundEventPrediction | None

Source sound event prediction.

target SoundEventAnnotation | None

Target sound event annotation.

uuid UUID
Attributes
affinity instance-attribute

Affinity of the match between the source and target.

id = Field(..., exclude=True) class-attribute instance-attribute

Database ID of the evaluation.

metrics = Field(default_factory=list) class-attribute instance-attribute

Evaluation metrics.

score instance-attribute

Overall score of the evaluation.

source instance-attribute

Source sound event prediction.

target instance-attribute

Target sound event annotation.

uuid instance-attribute

SoundEventEvaluationCreate

Bases: BaseModel

Schema for creating a new sound event evaluation.

Parameters:

Name Type Description Default
affinity float

Affinity of the match between the source and target.

required
score float

Overall score of the evaluation.

required

Attributes:

Name Type Description
affinity float

Affinity of the match between the source and target.

score float

Overall score of the evaluation.

Attributes
affinity instance-attribute

Affinity of the match between the source and target.

score instance-attribute

Overall score of the evaluation.

SoundEventEvaluationUpdate

Bases: BaseSchema

Schema for updating a sound event evaluation.

Parameters:

Name Type Description Default
affinity float | None

Affinity of the match between the source and target.

None
score float | None

Overall score of the evaluation.

None
uuid UUID | None

UUID of the Sound Event Evaluation.

None

Attributes:

Name Type Description
affinity float | None

Affinity of the match between the source and target.

score float | None

Overall score of the evaluation.

uuid UUID | None

UUID of the Sound Event Evaluation.

Attributes
affinity = None class-attribute instance-attribute

Affinity of the match between the source and target.

score = None class-attribute instance-attribute

Overall score of the evaluation.

uuid = None class-attribute instance-attribute

UUID of the Sound Event Evaluation.

SoundEventPrediction

Bases: BaseSchema

Schema for a sound event prediction.

Parameters:

Name Type Description Default
uuid UUID

UUID of the prediction.

required
id int

Database ID of the prediction.

required
sound_event SoundEvent

Sound event to be predicted.

required
score float

Overall score of the prediction.

required
tags list[SoundEventPredictionTag]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>

Attributes:

Name Type Description
id int

Database ID of the prediction.

score float

Overall score of the prediction.

sound_event SoundEvent

Sound event to be predicted.

tags list[SoundEventPredictionTag]

Tags of the prediction.

uuid UUID

UUID of the prediction.

Attributes
id = Field(..., exclude=True) class-attribute instance-attribute

Database ID of the prediction.

score instance-attribute

Overall score of the prediction.

sound_event instance-attribute

Sound event to be predicted.

tags = Field(default_factory=list) class-attribute instance-attribute

Tags of the prediction.

uuid instance-attribute

UUID of the prediction.

SoundEventPredictionCreate

Bases: BaseModel

Schema for creating a new sound event prediction.

Parameters:

Name Type Description Default
geometry TimeStamp | TimeInterval | Point | LineString | Polygon | BoundingBox | MultiPoint | MultiLineString | MultiPolygon

Geometry of this sound event prediction.

required
score float

Overall score of the prediction.

required

Attributes:

Name Type Description
geometry Geometry

Geometry of this sound event prediction.

score float

Overall score of the prediction.

Attributes
geometry = Field(..., discriminator='type') class-attribute instance-attribute

Geometry of this sound event prediction.

score instance-attribute

Overall score of the prediction.

SoundEventPredictionTag

Bases: BaseSchema

Schema for a sound event prediction tag.

Parameters:

Name Type Description Default
score float

Score of the tag.

required
tag Tag

Tag.

required

Attributes:

Name Type Description
score float

Score of the tag.

tag Tag

Tag.

Attributes
score instance-attribute

Score of the tag.

tag instance-attribute

Tag.

SoundEventPredictionUpdate

Bases: BaseModel

Schema for updating a sound event prediction.

Parameters:

Name Type Description Default
uuid UUID | None

UUID of the prediction.

required
score float | None

Overall score of the prediction.

required

Attributes:

Name Type Description
score float | None

Overall score of the prediction.

uuid UUID | None

UUID of the prediction.

Attributes
score instance-attribute

Overall score of the prediction.

uuid instance-attribute

UUID of the prediction.

SoundEventUpdate

Bases: BaseSchema

Schema for SoundEvent objects updated by the user.

Parameters:

Name Type Description Default
geometry TimeStamp | TimeInterval | Point | LineString | Polygon | BoundingBox | MultiPoint | MultiLineString | MultiPolygon

The geometry of the sound event.

required

Attributes:

Name Type Description
geometry Geometry

The geometry of the sound event.

Attributes
geometry = Field(..., discriminator='type') class-attribute instance-attribute

The geometry of the sound event.

SpectrogramParameters

Bases: STFTParameters, AmplitudeParameters

Parameters for spectrogram computation.

Parameters:

Name Type Description Default
channel int

Channel to use for spectrogram computation.

0
pcen bool

Whether to apply PCEN for de-noising.

True
cmap str

Colormap to use for spectrogram.

'gray'

Attributes:

Name Type Description
channel int

Channel to use for spectrogram computation.

cmap str

Colormap to use for spectrogram.

pcen bool

Whether to apply PCEN for de-noising.

Attributes
channel = 0 class-attribute instance-attribute

Channel to use for spectrogram computation.

cmap = 'gray' class-attribute instance-attribute

Colormap to use for spectrogram.

pcen = True class-attribute instance-attribute

Whether to apply PCEN for de-noising.

Tag

Bases: BaseSchema

Schema for Tag objects returned to the user.

Parameters:

Name Type Description Default
id int

Database ID of the tag.

required
key str

Key of the tag.

required
value str

Value of the tag.

required

Attributes:

Name Type Description
id int

Database ID of the tag.

key str

Key of the tag.

value str

Value of the tag.

Attributes
id = Field(..., exclude=True) class-attribute instance-attribute

Database ID of the tag.

key instance-attribute

Key of the tag.

value instance-attribute

Value of the tag.

TagCount

Bases: BaseSchema

Schema for TagCount objects returned to the user.

Parameters:

Name Type Description Default
tag Tag

Tag object.

required
count int

Count of the tag.

required

Attributes:

Name Type Description
count int

Count of the tag.

tag Tag

Tag object.

Attributes
count instance-attribute

Count of the tag.

tag instance-attribute

Tag object.

TagCreate

Bases: BaseModel

Schema for creating Tag objects.

Parameters:

Name Type Description Default
key str

Key of the tag.

required
value str

Value of the tag.

required

Attributes:

Name Type Description
key str

Key of the tag.

value str

Value of the tag.

Attributes
key = Field(min_length=1, max_length=255) class-attribute instance-attribute

Key of the tag.

value = Field(min_length=1, max_length=255) class-attribute instance-attribute

Value of the tag.

TagUpdate

Bases: BaseModel

Schema for updating Tag objects.

Parameters:

Name Type Description Default
key str | None

Key of the tag.

None
value str | None

Value of the tag.

None

Attributes:

Name Type Description
key str | None

Key of the tag.

value str | None

Value of the tag.

Attributes
key = Field(default=None, min_length=1, max_length=255) class-attribute instance-attribute

Key of the tag.

value = Field(default=None, min_length=1, max_length=255) class-attribute instance-attribute

Value of the tag.

User

Bases: BaseUser[UUID]

Schema for User objects returned to the user.

Parameters:

Name Type Description Default
username str
required
name str | None
None
created_on datetime
required

Attributes:

Name Type Description
created_on datetime
name Optional[str]
username str
Attributes
created_on instance-attribute
name = None class-attribute instance-attribute
username instance-attribute

UserCreate

Bases: BaseUserCreate

Schema for User objects created by the user.

Parameters:

Name Type Description Default
username str
required
name str | None
None

Attributes:

Name Type Description
name str | None
username str
Attributes
name = None class-attribute instance-attribute
username instance-attribute

UserRun

Bases: BaseSchema

Schema of a user run as returned to the user.

Parameters:

Name Type Description Default
uuid UUID

Unique identifier of the user run.

required
id int

The databset identifier of the model run.

required
user SimpleUser

The user who created the user run.

required

Attributes:

Name Type Description
id int

The databset identifier of the model run.

user SimpleUser

The user who created the user run.

uuid UUID

Unique identifier of the user run.

Attributes
id = Field(..., exclude=True) class-attribute instance-attribute

The databset identifier of the model run.

user instance-attribute

The user who created the user run.

uuid instance-attribute

Unique identifier of the user run.

UserRunCreate

Bases: BaseModel

Model Run creation schema.

UserRunUpdate

Bases: BaseModel

Schema for updating a user run.

Parameters:

Name Type Description Default
uuid UUID

Generate a random UUID.

UUID('04dce7e1-22db-4e7f-b07e-653ed063e8a5')

Attributes:

Name Type Description
uuid UUID

Unique identifier of the user run.

Attributes
uuid = Field(default_factory=uuid4) class-attribute instance-attribute

Unique identifier of the user run.

UserUpdate

Bases: BaseUserUpdate

Schema for User objects updated by the user.

Parameters:

Name Type Description Default
username str | None
None
name str | None
None

Attributes:

Name Type Description
name str | None
username str | None
Attributes
name = None class-attribute instance-attribute
username = None class-attribute instance-attribute