# Audible Warning in All Clients

**URL:** <https://forum.inductiveautomation.com/t/audible-warning-in-all-clients/103419>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [March 9, 2025, 3:19pm UTC](https://forum.inductiveautomation.com/t/audible-warning-in-all-clients/103419 "2025-03-09T15:19:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![david\_rafael\_ulloque](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@david\_rafael\_ulloque](https://forum.inductiveautomation.com/u/david_rafael_ulloque)\
**Post date:** [March 9, 2025, 3:19pm UTC](https://forum.inductiveautomation.com/t/audible-warning-in-all-clients/103419/1 "2025-03-09T15:19:55Z")

</div>

Hi,

I'm trying to set an audible warning for my vision application. I'm using the `system.util.playSoundClip` function to play a `.WAV` file. My question is: where do I need to save my `.WAV` file to ensure it can be played on all clients?

Currently, I'm using this function in an **On Change** tag **Client Event Script**. My `.WAV` file is located on the gateway, but the script is not working. I wonder if the issue is related to the file location.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 9, 2025, 3:22pm UTC](https://forum.inductiveautomation.com/t/audible-warning-in-all-clients/103419/2 "2025-03-09T15:22:37Z")

</div>

Yes, Vision runs directly in the client, and expects to find the file there. You should use a project startup script that looks for the files you need locally, and if not there, use `system.util.sendRequest()` to retrieve the file bytes from the gateway and then write them locally.

---

<div class="post-metadata">

**Author:** ![david\_rafael\_ulloque](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@david\_rafael\_ulloque](https://forum.inductiveautomation.com/u/david_rafael_ulloque)\
**Post date:** [March 9, 2025, 8:45pm UTC](https://forum.inductiveautomation.com/t/audible-warning-in-all-clients/103419/3 "2025-03-09T20:45:58Z")

</div>

Thanks for your reply.

I found the code below in an Ignition manual. I figured out how to save the WAV file into the project database, so now I can query the file from the database and play the sound on every client. I tested it, and it worked for me!

```python
# This code would pull a sound clip out of a BLOB field from a database,
# playing it asynchronously at half volume.
  
query = "SELECT wavBlob FROM sounds WHERE type='alert_high'"
soundData = system.db.runScalarQuery(query)
  
system.util.playSoundClip(soundData, 0.5, 0)

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 10, 2025, 1:14am UTC](https://forum.inductiveautomation.com/t/audible-warning-in-all-clients/103419/4 "2025-03-10T01:14:13Z")

</div>

You probably should use a Named Query for that, with caching enabled, as all of your clients will make that same request every time that alarm fires.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 10, 2025, 2:35pm UTC](https://forum.inductiveautomation.com/t/audible-warning-in-all-clients/103419/5 "2025-03-10T14:35:49Z")

</div>

You could also stash a [Sound Player](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/vision-components/misc/sound-player) component somewhere, e.g. on an always present docked window. The Sound Player embeds the audio directly inside the project, so as long as your audio file isn't too large it's a useful alternative if you want something without any external dependencies.
