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

Option to create events programmatically #7072

Closed
1 task done
arian81 opened this issue Jan 18, 2024 · 4 comments
Closed
1 task done

Option to create events programmatically #7072

arian81 opened this issue Jan 18, 2024 · 4 comments
Labels
brainstorming Brainstorming issue

Comments

@arian81
Copy link
Contributor

arian81 commented Jan 18, 2024

  • I have searched to see if a similar issue already exists.

Is your feature request related to a problem? Please describe.
Not being able to call events programmatically. i.e When I have started recording audio there's no way to stop recording audio programmatically without user interaction. A useful application of this would be for Real time speech detection application where you want to pass the transcribed data to a different function.

Describe the solution you'd like
At current moment you can only detect events and even if the user presses the stop button you wouldn't know if the audio has been fully transcribed yet. if there's option to cause a recording stop event programmatically then you could detect when there's no more transcription and then call the stop instead of user doing that.

Additional context
This might be a very hard feature to implement I just thought maybe it's a feature other people would have use for as well. If there's already a way of doing what I described here I would definitely appreciate your comments.

@abidlabs
Copy link
Member

Interesting, this would be a pretty big new API so I wonder if we can think of a way to facilitate the use case you described with the existing Gradio feature set:

A useful application of this would be for Real time speech detection application where you want to pass the transcribed data to a different function.

@abidlabs abidlabs added the brainstorming Brainstorming issue label Jan 21, 2024
@chrisk414
Copy link

I also would like to call ui event programmatically.
One use case would be, simulating users inputs. This can be used in many situations, for example, automatizing user tests by calling "click", "submit" and etc.

@abidlabs
Copy link
Member

@chrisk414 for user tests you can consider using the Python client: https://www.gradio.app/guides/getting-started-with-the-python-client

Cc @dawoodkhan82 with regards to the audio use case

@abidlabs
Copy link
Member

Hi @arian81 this is now possible on the 5.0-dev branch as we've added a recording prop in the gr.Audio component that can be set by events. See: #9419

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

No branches or pull requests

3 participants