# system.util.playSoundClip

**URL:** <https://forum.inductiveautomation.com/t/system-util-playsoundclip/58193>\
**Category:** Ignition\
**Created:** [April 7, 2022, 8:03pm UTC](https://forum.inductiveautomation.com/t/system-util-playsoundclip/58193 "2022-04-07T20:03:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [April 7, 2022, 8:03pm UTC](https://forum.inductiveautomation.com/t/system-util-playsoundclip/58193/1 "2022-04-07T20:03:03Z")

</div>

Hello  
So could help me, please?  
I want to play sound wav in my ignition application and I don know where I have to save my file with wav effects. I think that I will have a sound file on the server and then I will play the sound. I must save my file to the root folder on my project? And what will then be the path?  
It will be some this?

```auto
system.util.playSoundClip("C:\\MyRootFolder\\....\\siren.wav") 

```

My root application folder is :  
" C:\Program Files\Inductive Automation\Ignition\data\projects\OPT\_Reports"  
Because this choice isn’t function ☹  
Than you 😃

---

<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:** [April 7, 2022, 8:16pm UTC](https://forum.inductiveautomation.com/t/system-util-playsoundclip/58193/2 "2022-04-07T20:16:30Z")

</div>

Are you trying to play a sound in Vision, or Perspective, or from wherever the gateway is running over whatever local speakers are connected?

Vision:  
Use the [Sound Player](https://docs.inductiveautomation.com/display/DOC81/Vision+-+Sound+Player).

Perspective:  
Use the [Audio](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Audio) component (requires 8.1.16+).

Only in the rare case where you need to play unsolicited audio directly from a script would you use `playSoundClip`.

As for usage, you supply `playSoundClip` with the raw content of an audio file to pass to your speakers, so you would need to e.g. `system.file.readFileAsBytes(path)` and then pass the byte array to `playSoundClip`. The path to use to the file is going to depend on where you’re invoking your script from.

---

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [April 7, 2022, 8:24pm UTC](https://forum.inductiveautomation.com/t/system-util-playsoundclip/58193/3 "2022-04-07T20:24:36Z")

</div>

Thank you  
I use Perspective but I don’t have component Audio I probably I have version 8.1.9 ☹  
Is it possible how I can play my sound?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/292bc015024de531b22501e36cefc7fcb74c075f.png)

---

<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:** [April 7, 2022, 8:32pm UTC](https://forum.inductiveautomation.com/t/system-util-playsoundclip/58193/4 "2022-04-07T20:32:01Z")

</div>

The right way would be to upgrade 🙂  
It's free to upgrade to the latest release of the same major version.

The workaround solution would be to use the iframe-based 'hack' described here:

> [@\[feature-12986, 15300\]Unacknowledged Alarm Sound](https://forum.inductiveautomation.com/t/feature-12986-15300-unacknowledged-alarm-sound/25460/3):
>
> Use an invisible IFrame, and bind src to (don’t take this literally wink ): if(something = 1, 'http://path/to/some/noise.mp3', '' )

You'll need to host your files in some way that's accessible (over the network) to everywhere you're launching Perspective sessions from.

---

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [April 7, 2022, 8:39pm UTC](https://forum.inductiveautomation.com/t/system-util-playsoundclip/58193/5 "2022-04-07T20:39:47Z")

</div>

Ok thank you for me will be better upgrade 😃
