Can't get node 'play soundfile' to work

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:/

[{"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 PMnode: MP3
msg : string[35]
"Error playing back file D:\TEST.mp3"

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).

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:/

[{"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:/"}]

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.

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

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.).

I believe there is a beta node that might let you do that, node-red-contrib-sox-utils uyou won't find it in the Flow yet, so follow the link to get to the announcement and directions for installing it.

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