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

AudioButton #6438

Closed taoari closed 10 months ago

taoari commented 11 months ago

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

While there is already a gr.Audio. However, it is too large. It would be good if there could be a gr.AudioButton, similar to gr.UploadButton, so that it can be put in a single line with gr.TextBox. This is helpful for model LLM apps with audio input.

Describe the solution you'd like
A clear and concise description of what you want to happen.

The following is a screenshot from Google. Something like that, a voice input button can be included.

Screenshot 2023-11-15 at 10 16 09 AM

Additional context
Add any other context or screenshots about the feature request here.

freddyaboulton commented 11 months ago

This is a great candidate for a custom component!

I actually built something like this (not exactly like the UI shown) during the gradio 4.0 beta. It places an upload button next to a text box and sends the data together.

https://huggingface.co/spaces/freddyaboulton/gradio_textwithattachments

Im actually planning on making this component compatible with the latest gradio 4.0 version this week.

Stay tuned but in the meantime try to build this yourself!

taoari commented 11 months ago

@freddyaboulton Thank you! I just checked with your link, it is actually textbox + uploadbutton. I am expecting an audiobutton for this issue, so that something like textbox + audiobutton + uploadbutton can be achieved. You mentioned that you are working on this component, not sure if you mean "textbox + uploadbutton" or "audiobutton".

abidlabs commented 10 months ago

@freddyaboulton is working on the textbox + uploadbutton.

Would you be interested in making an "audiobutton" @taoari? Let us know if that's the case and we're happy to provide suggestions!

abidlabs commented 10 months ago

I'll go ahead and close this issue since we are not planning to include this in the core Gradio library. But happy to help if you are interested in making this a custom Gradio component (feel free to ask questions in this issue).