gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.41k stars 2.53k forks source link

Audio selection UI. #3156

Closed aqibsaeed closed 11 months ago

aqibsaeed commented 1 year ago

Hi,

Is it possible to have an audio UI that allows selection of the segment, something like:

image

Thanks.

freddyaboulton commented 1 year ago

Hi @aqibsaeed !

No it's not possible right now. We would probably support this via a custom component. We'll work on supporting custom components soon but don't have a clear idea of when that will be done.

aqibsaeed commented 1 year ago

Alright, related question, is there a way currently to add visualization on top audio clip?

abidlabs commented 1 year ago

What kind of visualization @aqibsaeed? But if it's similar to what you showed above, no that is not possible at the moment

aqibsaeed commented 1 year ago

Not like the above but a simple markers sort of lines to highlight predictions.

abidlabs commented 1 year ago

Not at the moment, no the Audio component does not support this

abidlabs commented 11 months ago

Hey! We've now made it possible for Gradio users to create their own custom components -- meaning that you can write some Python and JavaScript (Svelte), and publish it as a Gradio component. You can use it in your own Gradio apps, or share it so that anyone can use it in their Gradio apps. Here are some examples of custom Gradio components:

You can see the source code for those components by clicking the "Files" icon and then clicking "src". The complete source code for the backend and frontend is visible. In particular, its very fast if you want to build off an existing component. We've put together a Guide: https://www.gradio.app/guides/five-minute-guide, and we're happy to help. Hopefully this will help address this issue.

freddyaboulton commented 11 months ago

I think this is also done via the new audio component in gradio 4.0 which comes with a built in trimming functionality.

So going to close as I think there's no further action here but feel free to make your own audio selection UI via a custom component!