-
Notifications
You must be signed in to change notification settings - Fork 68
PTDT-3807: Add temporal audio annotation support #2013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
e4fd630
dbcc7bf
dbb592f
ff298d4
16896fd
7a666cc
ac58ad0
67dd14a
a1600e5
b4d2f42
fadb14e
1e12596
c2a7b4c
26a35fd
b16f2ea
943cb73
a838513
0ca9cd6
7861537
6c3c50a
68773cf
58b30f7
0a63def
538ba66
9675c73
327800b
1174ad8
2361ca3
59f0cd8
b186359
e63b306
6b54e26
ccad765
735bb09
db3fb5e
b0d5ee4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from typing import Optional | ||
from pydantic import Field, AliasChoices | ||
|
||
from labelbox.data.annotation_types.annotation import ( | ||
ClassificationAnnotation, | ||
) | ||
|
||
|
||
class AudioClassificationAnnotation(ClassificationAnnotation): | ||
"""Audio classification for specific time range | ||
Examples: | ||
- Speaker identification from 2500ms to 4100ms | ||
- Audio quality assessment for a segment | ||
- Language detection for audio segments | ||
Args: | ||
name (Optional[str]): Name of the classification | ||
feature_schema_id (Optional[Cuid]): Feature schema identifier | ||
value (Union[Text, Checklist, Radio]): Classification value | ||
start_frame (int): The frame index in milliseconds (e.g., 2500 = 2.5 seconds) | ||
end_frame (Optional[int]): End frame in milliseconds (for time ranges) | ||
segment_index (Optional[int]): Index of audio segment this annotation belongs to | ||
extra (Dict[str, Any]): Additional metadata | ||
""" | ||
|
||
start_frame: int = Field( | ||
validation_alias=AliasChoices("start_frame", "frame"), | ||
serialization_alias="start_frame", | ||
) | ||
rishisurana-labelbox marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Audio Annotation API InconsistencyThe |
||
end_frame: Optional[int] = Field( | ||
default=None, | ||
validation_alias=AliasChoices("end_frame", "endFrame"), | ||
serialization_alias="end_frame", | ||
) | ||
segment_index: Optional[int] = None | ||
|
Uh oh!
There was an error while loading. Please reload this page.