How to play audio file in browser / on Windows PC?

Hello, I'm pretty new to node-red, so maybe the solution is obvious, but I can't figure it out. I was hoping to be able to trigger a sound on my computer (doesn't matter if it's in my browser or through other means) using node-red, but I can't find how to get it to work. I tried node-red-contrib-play-audio-file and node-red-contrib-play-sound, but I couldn't find how I'm supposed to trigger play-sound, and for play-audio-file I get "INFO: Could not find files for the given pattern(s)." (Maybe the way I put the path to the file is incorrect? It's set to D:\sounds\sound.wav).
This might be my fault, but I can barely find any information on how to use either of these two modules, so I'm pretty lost.

Hi welcome to Node-Red, do you know how to import a flow ?

You have to install node-red-dashboard from Palette : image
And import this Flow :

[{"id":"76d30983.299248","type":"inject","z":"891d9857.40c7e8","name":"test","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":200,"y":1870,"wires":[["41775b78.4c9a54"]]},{"id":"41775b78.4c9a54","type":"file in","z":"891d9857.40c7e8","name":"sound","filename":"D:\\\\Documents\\\\Music\\\\Speech Misrecognition.wav","format":"","chunk":false,"sendError":false,"encoding":"none","x":320,"y":1870,"wires":[["e8d2ca21.103598"]]},{"id":"e8d2ca21.103598","type":"ui_audio","z":"891d9857.40c7e8","name":"","group":"c8f428f6.3c4ca8","voice":"fr-FR","always":true,"x":450,"y":1870,"wires":[]},{"id":"c8f428f6.3c4ca8","type":"ui_group","name":"Group 1","tab":"5a28a0ac.e6b3e","order":1,"disp":true,"width":"9","collapse":false},{"id":"5a28a0ac.e6b3e","type":"ui_tab","name":"Home","icon":"dashboard","order":15}]

Note : you have to put double \ in your Filename directory :

1 Like

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