# Play Audio node question

**URL:** <https://discourse.nodered.org/t/play-audio-node-question/6438>\
**Category:** General\
**Created:** [6 January 2019 03:31 UTC](https://discourse.nodered.org/t/play-audio-node-question/6438 "2019-01-06T03:31:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [6 January 2019 03:31 UTC](https://discourse.nodered.org/t/play-audio-node-question/6438/1 "2019-01-06T03:31:28Z")

</div>

I am having some problems with the _Play\_Audio_ node.

On one Node-Red Pi (Raspian), I inject once with the _inject_ node into a _File-In_ node to read a .wav file and the output of that node is "a single Buffer Object", which flows to the _Play Audio_ node.

When I click on deploy, and Node-Red restarts when the deploy is finished, then the _inject_ node runs once to flow into the _File\_In_ node that reads a wav file into a buffer object, which then flows to the _Play Audio_ node, giving me an audio alert that the deploy has finished. (The wav file was copied from my PC if you wish to duplicate my efforts).

Pretty cool.

![deploy](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/64980bbf819ce43e9a3004dfd423bfaa66eebc2a.jpeg)

`[{"id":"ef195245.f4512","type":"play audio","z":"afd5184a.0cd4d8","name":"","voice":"0","x":630,"y":1160,"wires":[]},{"id":"adaa06f7.109c88","type":"inject","z":"afd5184a.0cd4d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":150,"y":1160,"wires":[["967ef650.a43ee8"]]},{"id":"967ef650.a43ee8","type":"file in","z":"afd5184a.0cd4d8","name":"Reads the .wav file","filename":"/home/pi/sounds/Unlock.wav","format":"","chunk":false,"sendError":false,"x":370,"y":1160,"wires":[["ef195245.f4512"]]},{"id":"27191a7f.ad17d6","type":"comment","z":"afd5184a.0cd4d8","name":"Sends a tone. Send once at start tells me when 'deploy' is finished.","info":"","x":330,"y":1120,"wires":[]}]`

However, here's the problem.

On a second Pi running Node Red on HassOS, I get silence from the same flow. (Yes, I changed the absolute file location for the wav file).

I verified that the _File-In_ node was finding the file by misspelling the filename. I put a bad filename ("Unloc.wav" instead of "Unlock.wav") and I get this error in the _debug_ node following the _File\_In_ node:

`Error: ENOENT: no such file or directory, open '/config/node-red/lib/sounds/Unloc.wav'`

I do not get any error when the correct filename is used, so I am sure the _File\_In_ node is finding the file.

I know that the _Play Audio_ node is working because instead of the _File\_In_ node, I can use a _function_ node to put "Deploy Finished" into msg.payload then flow that into the _Play Audio_ node, and I hear "Deploy Finished" on the PC speaker:

 ![deploy_finished](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5f120782fba2b3c33accfdbf69fafe51f6aebe07.jpeg)

`[{"id":"a642ec4e.80e38","type":"function","z":"11ef03a7.e4b69c","name":"Set msg.payload to \"Deploy finished.\"","func":"msg.payload = \"Deploy finished.\";\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":340,"wires":[["dae07b79.d85dd8"]]},{"id":"c1bbf37d.9def6","type":"inject","z":"11ef03a7.e4b69c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":340,"wires":[["a642ec4e.80e38"]]},{"id":"dae07b79.d85dd8","type":"play audio","z":"11ef03a7.e4b69c","name":"","voice":"4","x":670,"y":340,"wires":[]}]`

Using the TTS feature of the _Play Audio_ node is a sufficient workaround, but I am curious why the _Play Audio_ node in the Node-Red on HassOS isn't playing the wav file?

Note, it _did_ work on the HassOS Pi before upgrading Home Assistant.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [6 January 2019 08:08 UTC](https://discourse.nodered.org/t/play-audio-node-question/6438/2 "2019-01-06T08:08:52Z")

</div>

check you have the latest version of the audio nodes by seeing if there is an update in Manage Pallete option from the menu

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [6 January 2019 22:43 UTC](https://discourse.nodered.org/t/play-audio-node-question/6438/3 "2019-01-06T22:43:35Z")

</div>

They are the same version.
