We had an interesting discussion some time ago, about raw audio samples in Node-RED. In that discussion we needed to add a WAV headers to the raw audio samples, to make sure that other nodes know what those bytes represent (number of channels, number of bytes per sample, ...).
Got a question last weekend to publish that node on NPM. There is now a beta version available, which you can install like this:
npm install email@example.com
I have extended the node to support 3 actions:
- Get the WAV header in a human readable format, in case you want to know which kind of audio you are dealing with.
- Add your own WAV header to raw audio samples (PCM), based on the input you have specified in the config screen.
- Remove the WAV header to convert a WAV chunk to raw audio samples (PCM).
There is quite some information available on the readme page.
As always al 'constructive' feedback is welcome.
Have fun with it!