gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Optional Audio/Sound alert when a job is complete

Open nelsonjchen opened this issue 3 years ago • 1 comments

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

Is your feature request related to a problem? Please describe.
I frequently go browse other tabs or applications when I am running a long running batch of jobs. Sometimes I fall into a hole and take a bit longer than expected to get back to the tab. If I stay in the research hole a bit too long, my hardware is idle when it could be working on jobs batches. I want to maximize utilization of my hardware, iterate more, and the limiter is me.

Describe the solution you'd like
I would like some sort of optional audio/sound notification to be played when generation is complete so I know to return to the UI, evaluate the results, tinker, and kickoff the next batch. This should help keep my hardware working and help increase output and utilization.

I don't know Gradio's API that well to be honest and this may very well be implementable downstream as a Gradio consumer without upstream support. I do know that if the functionality is implemented upstream and is turnkey that downstream Gradio users are more likely to implement and turn on a pre-existing turnkey audio/sound alert solution. I do see a lot more Gradio in my future.

Additional context
I have a more specific version of this request here for the hlky/stable-diffusion's gradio implementation: https://github.com/hlky/stable-diffusion-webui/discussions/232

I figure it might be a good idea to get this idea upstream so that maybe it can flow back downstream someday. I believe it to be a pretty generic idea that isn't specific to my use case and is applicable to other uses as well.

I do have a suggestion for a default sound which I don't think should kick off anyone's tinnitus: https://freesound.org/people/collierhs_colinlib/sounds/588718/

It reminds me of the buckle your seatbelt sign/turbulence for passengers warning on an airplane for some reason.

nelsonjchen avatar Sep 03 '22 17:09 nelsonjchen

I really like this suggestion!

abidlabs avatar Sep 05 '22 21:09 abidlabs

https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/1126

This was added to the AUTOMATIC1111 SD UI.

The code doesn't look heavy. Still would love more proliferation. Maybe throw something similar into some samples/documentation?

nelsonjchen avatar Sep 28 '22 20:09 nelsonjchen

Very cool @nelsonjchen !

freddyaboulton avatar Sep 28 '22 22:09 freddyaboulton

Great @nelsonjchen! Yes we can add this as a demo people can refer to!

abidlabs avatar Sep 28 '22 22:09 abidlabs