In case it hasn’t become obvious: the problem you’re solving is not a simple one – unlucky!
tleylan’s suggestion is a pretty good one, his proposed architecture is something like this (I think):
- Your twitch bot monitors twitch chat
- When it sees a msg like
- It sends a signal via websocket to a web page (could be same Glitch project or another one)
- The web page plays the noise locally on your machine
I would like to briefly propose another idea
In this case, it can constantly monitor the chat, and if the most recent message (by filtering the lines of HTML that exist in the chat window) is
!sfx, you get your page (or browser extension) to play the noise.
You know what… I just looked up twitch developer resources, and they seem to have some pretty flexible extension points, somebody made a thing a lot like what you want to make: Sound Alerts: A Twitch Bits-in-Extensions success story | Twitch Blog
Maybe you can look into how that’s done at the extension docs: Extensions | Twitch Developers
Hope this doesn’t overwhelm you with options Have fun!!