Skip to content
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

Change the labelling interface based on the task input data (for Audio and Video) #7146

Open
ycrouin opened this issue Feb 27, 2025 · 1 comment

Comments

@ycrouin
Copy link

ycrouin commented Feb 27, 2025

Is your feature request related to a problem? Please describe.

I am working with audio and video files that I have to classify. The media files are stored in S3. I would like to show the Audio tag if the file extension is .mp3 and the Video tag if the file extension is .mp4. However, I am unsure how to dynamically display the appropriate tag based on the input data.

Describe the solution you'd like

<Audio name="audio" value="$media" visibleWhen="$media.endsWith('.mp3')"/> 
<Video name="video" value="$media" visibleWhen="$media.endsWith('.mp4')"/> 

with

{
  "media": "s3://bucket/singing-under-shower.mp3"
}

Describe alternatives you've considered

The workaround I found was to use HyperText and provide HTML in the JSON tasks, but the result doesn't look as good and doesn't support LabelStudio labelling capabilities.

<HyperText name="media" value="$media"/> 

For audio tasks:

{
  "media": "<audio controls><source src=\"s3://bucket/singing-under-shower.mp3\" type=\"audio/mp3\"></audio>"
}

For video tasks:

{
  "media": "<video controls><source src=\"s3://bucket/ice-cream.mp4\" type=\"video/mp4\"></video>"
}
@heidi-humansignal
Copy link
Collaborator

heidi-humansignal commented Mar 3, 2025

Hello,

Thank you for your request, it's definitely a great feature request, however at this moment (2025-03-05) this setup is not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants