-
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?
PTDT-3807: Add temporal audio annotation support #2013
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
395c824
to
943cb73
Compare
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all changes made by GH bot to this file..
61bb9d0
to
a838513
Compare
segment_index: Optional[int] = None | ||
|
||
|
||
class AudioObjectAnnotation( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this class for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed it - it was unnecessary
"## Temporal Audio Annotations\n", | ||
"\n", | ||
"You can create temporal annotations for individual tokens (words) with precise timing:\n" | ||
], | ||
"cell_type": "markdown" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update text examples (for the updated interface), add examples for the radio and checklist
examples/README.md
Outdated
<td>Custom Embeddings</td> | ||
<td><a href="https://github.com/Labelbox/labelbox-python/tree/develop/examples/basics/custom_embeddings.ipynb" target="_blank"><img src="https://img.shields.io/badge/GitHub-100000?logo=github&logoColor=white" alt="Open In Github"></a></td> | ||
<td><a href="https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/custom_embeddings.ipynb" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a></td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are changes in this file for?
def audio_annotations_by_frame( | ||
self, | ||
) -> Dict[ | ||
int, List[Union[AudioObjectAnnotation, AudioClassificationAnnotation]] | ||
]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove audio_annotations_by_frame
and add the AudioClassificationAnnotation
and AudioTextClassificationAnnotation
to the frame_annotations()
method
0b9085d
to
0ca9cd6
Compare
9cfd864
to
7861537
Compare
2ca2cba
to
6c3c50a
Compare
f6cbd31
to
68773cf
Compare
e585aab
to
58b30f7
Compare
answer_items.append({ | ||
"name": first_ann.value.answer[0].name, # Single item for now | ||
"frames": frames | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start_frame: int = Field( | ||
validation_alias=AliasChoices("start_frame", "frame"), | ||
serialization_alias="startframe", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return res | ||
|
||
|
||
class FrameLocation(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restore
Description
This PR introduces Audio Temporal Annotations - a new feature that enables precise time-based annotations for audio files in the Labelbox SDK. This includes support for temporal classification annotations with millisecond-level timing precision.
Motivation: Audio annotation workflows require precise timing control for applications like:
Context: This feature extends the existing audio annotation infrastructure to support temporal annotations, using a millisecond-based timing system that provides the precision needed for audio applications while maintaining compatibility with the existing NDJSON serialization format.
Type of change
All Submissions
New Feature Submissions
Changes to Core Features
Summary of Changes
New Audio Temporal Annotation Types
AudioClassificationAnnotation
: Time-based classifications (radio, checklist, text) for audio segmentsCore Infrastructure Updates
Testing
Documentation & Examples
audio.ipynb
with temporal annotation examplesdemo_audio_token_temporal.py
showing per-token temporal annotationsSerialization & Import Support
Key Features
Precise Timing Control
Per-Token Temporal Annotations
Ontology Setup for Temporal Annotations
Label Integration
This feature enables the Labelbox SDK to support precise temporal audio annotation workflows while maintaining the same high-quality developer experience as existing audio annotation features.
How to test
rishi/ptdt-3807/temporal-audio-prelabel
Python script and requirements.txt
requirements.txt: