I have a work program, this notifies me if I get a call or email, the work program then presents an accept/decline page, and does not proceed until I either accept, decline, or it times out.
I want it to do two different things depending on if it's a call or email
It provides no notification other than the sound and an "accept" button on the page
I have a chrome window open that does nothing but this, and I never use chrome for anything else
I want to automatically do various things when I receive either this call or email
I want it to be broadly applicable rather than a script designed for the specific website giving me the notification (so not a chrome extension). This prevents me from having to update any code in the event that the backend changes dramatically, and even if the notification sound changes, i'd just record a new sound as the activation noise.
The noise is always the same, and hasn't changed for many years, and there is a distinct noise between calls and emails
They never overlap, they never play multiple times at the same time, and they never make any noises other than those two. The noises are distinct.
but so far my solution is to setup dejavu to listen to a sink i've named work and then set chrome to play on that sink, and that sink will be setup to forward to my default audio device
It's really not in this case, I can see why people think that since i've been vague, but tbh I thought somebody would have already made an easy sound recognition program and I just hadn't seen it, and that once someone pointed that to me the rest would be easy.
Here is the entirety of the problem:
I have a work program, this notifies me if I get a call or email, the work program then presents an accept/decline page, and does not proceed until I either accept, decline, or it times out.
I want it to do two different things depending on if it's a call or email
It provides no notification other than the sound and an "accept" button on the page
I have a chrome window open that does nothing but this, and I never use chrome for anything else
I want to automatically do various things when I receive either this call or email
I want it to be broadly applicable rather than a script designed for the specific website giving me the notification (so not a chrome extension). This prevents me from having to update any code in the event that the backend changes dramatically, and even if the notification sound changes, i'd just record a new sound as the activation noise.
The noise is always the same, and hasn't changed for many years, and there is a distinct noise between calls and emails
They never overlap, they never play multiple times at the same time, and they never make any noises other than those two. The noises are distinct.
These factors cause me to want to run a script once the noise is recognized, only if the noise is playing in a particular app. I'm using pipewire/hyprland on arch.
That sounds like a somewhat appealing solution, however, i'd like this to be more broadly applicable, i'd like it if even if it wasn't chrome, and was some other application making a particular noise, I could easily execute a script whenever that particular noise is played, allowing me to automate a bunch of things rather than just one specific weird thing.
I actually want the sound thing because I think it would be cool for automating a lot of different things easily
It wouldn't be like, optimal in terms of power consumption, but an audio signal in a specific program being recognized by my computer and executing a script is generalizable and useable in many places.
Gnome addons break nearly every version upgrade, so, I wouldn't recommend dash to panel, and the problem of settings they can get into is actually mitigated by kinoites snapshotting.
I highly recommend fedora kinoite for people who don't want to do maintenance or don't know how.
It being immutable makes updates incredibly easy, and makes it much harder to break the system, and kde is best for people who are familiar with windows.
here you go, if you have a better idea, pitch it:
but so far my solution is to setup dejavu to listen to a sink i've named work and then set chrome to play on that sink, and that sink will be setup to forward to my default audio device
https://github.com/worldveil/dejavu