I develop in a secure, air-gaped environment where it takes an act of congress to import modules. I needed a way to get audible alarms working for my remote endpoints and IA support saved the day.
For windows, navigate to the following directory:
C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main\
Linux:
/usr/local/bin/ignition/webserver/webapps/main/
Create a new directory for your .wav alarm files and add the file you want to use.
Add an audio component on a header in your perspective project, something that is always visible and for the source property give it this:
http://ip_of_gateway/name of_new_directory/alarm.wav
To play the audio for critical alarms add an expression binding:
if(runScript('len(system.alarm.queryStatus(priority=[4],state=[2]))'>0, true, false))
to the play property.
I have tested this in Fedora, Debian, Gentoo, Arch, Elementary, Ubuntu, & windows server 19, 10 & 11 successfully and gotten this to work.
If you are a developer, or even just an audio nerd like me, you should check out Reaper before heading straight to Audacity:
This feature can become obnoxious very quickly so I would kindly suggest you normalize your audio and add in 10-15 seconds of dead air if you intend to loop the audio.