# Can't get node 'play soundfile' to work

**URL:** <https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325>\
**Category:** General\
**Created:** [9 March 2021 11:23 UTC](https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325 "2021-03-09T11:23:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerxjac](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jerxjac](https://discourse.nodered.org/u/jerxjac)\
**Post date:** [9 March 2021 11:23 UTC](https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325/1 "2021-03-09T11:23:05Z")

</div>

I installed " node-red-contrib-play-soundfile " but can't get it to work.  
This is a little test flow with a link to my soundfile on D:/

```auto
[{"id":"6a739113.f47cd","type":"debug","z":"76a6fe94.1adb4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":450,"y":120,"wires":[]}]

```

But the Debug is giving:

_3/9/2021, 12:23:33 PM[node: MP3](http://localhost:1880/#)_  
_msg : string[35]_  
_"Error playing back file D:\TEST.mp3"_

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 March 2021 11:39 UTC](https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325/2 "2021-03-09T11:39:57Z")

</div>

Welcome to the forum @jerxjac.

Unfortunately you have only exported one debug node, not the relevant nodes. Mark all the nodes you want to export and then Export.

Are you running node-red and the browser on the same computer?

Is the file really D:/TEST.mp3? If you have the path to the file somewhere in your flow put the full path in. using forward slashes. Maybe something like D:/users/you/Music/TEST.mp3 (just guessing where it might be as I don't use windows).

---

<div class="post-metadata">

**Author:** ![jerxjac](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jerxjac](https://discourse.nodered.org/u/jerxjac)\
**Post date:** [9 March 2021 11:46 UTC](https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325/3 "2021-03-09T11:46:02Z")

</div>

Thank you Colin,

I just put the mp3 file in D:/TEST.mp3 for testing purpose. If I get it working it will be somewhere else.  
Tried both D:\ and D:/

```auto
[{"id":"47945222.9bd43c","type":"play-soundfile","z":"76a6fe94.1adb4","name":"MP3","directory":"c9ba187.d1a6ee8","file":"TEST.mp3","allow_multiple":true,"x":290,"y":120,"wires":[["6a739113.f47cd"]]},{"id":"a448cac7.f3f1f8","type":"inject","z":"76a6fe94.1adb4","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"start","x":160,"y":120,"wires":[["47945222.9bd43c"]]},{"id":"6a739113.f47cd","type":"debug","z":"76a6fe94.1adb4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":450,"y":120,"wires":[]},{"id":"c9ba187.d1a6ee8","type":"soundfile-directory","directory":"D:/"}]

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 March 2021 12:09 UTC](https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325/4 "2021-03-09T12:09:53Z")

</div>

Are you sure the file is called TEST.mp3 and not TEST.mp3.pmp3? I know windows has a habit of hiding file extensions.

However it does not work at all for me (on Ubuntu). Perhaps worth trying one of the other playback nodes unless someone here has experience with this node.

---

<div class="post-metadata">

**Author:** ![jerxjac](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@jerxjac](https://discourse.nodered.org/u/jerxjac)\
**Post date:** [9 March 2021 12:54 UTC](https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325/5 "2021-03-09T12:54:58Z")

</div>

Thank you for taking the time Colin,  
I'm looking for something that can play mp3 or wave  
and Allow multiple simultaneous playbacks.  
I have a background music and sometimes a message has to be broadcast.  
So if you have any idea's , much appreciated

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [9 March 2021 13:36 UTC](https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325/6 "2021-03-09T13:36:26Z")

</div>

No, sorry, I have never done it. Another alternative is to ask the question via an Issue on the node's github page ([GitHub - lutzer/node-red-contrib-play-soundfile: Plays a sound file on the system. Allows to set up a base directory which contains all the sound files.](https://github.com/lutzer/node-red-contrib-play-soundfile)).

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [9 March 2021 14:59 UTC](https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325/7 "2021-03-09T14:59:46Z")

</div>

I believe there is a beta node that might let you do that, [node-red-contrib-sox-utils](https://discourse.nodered.org/t/update-node-red-contrib-sox-utils-beta/35316) uyou won't find it in the Flow yet, so follow the link to get to the announcement and directions for installing it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 May 2021 15:00 UTC](https://discourse.nodered.org/t/cant-get-node-play-soundfile-to-work/42325/8 "2021-05-08T15:00:28Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
