Node-red-contrib-sox-utils dynamic recording name

Hi All,

First post go easy on me. I am setting up my first basic flow in Node-RED on my raspberry pi.

I am using node-red-contrib-sox-utils , the sox-play and sox-record to play a message and then record a message. I have set it up successfully to overwrite the same file recording. However I would like to make the file name dynamic I can see the creator of this suggests I can use msg.filename to control this - but I am struggling to visualize / set this up.

When linking an inject into the node - I get the following debug messages.

6/21/2022, 9:04:20 AMnode: b1427ee369dd593amsg : string[36]

"did you forget to enter a file path?"

6/21/2022, 9:04:20 AMnode: b1427ee369dd593amsg : string[12]

"no file path"

@BigBlueBeans welcome to the forum!

  • Please export your flow and attach it to a reply (see below)
  • what version or node-red and node.js are you running (you can get this from the startup log)
  • have you tried adding a change node before the Sox node to set msg.file name to what you want?
  • are you setting msg.file name to the full path of the file?

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

   code goes here 

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.