Play Sound from USB Microphone

Hello,

Can anybody tell me if it's possible to play the sound received from a USB microphone attached to a Raspberry PI and play it through the Dashboard UI? I have tried several microphone and play sound node combinations, where .wav files are recorded and replayed but no sound has been received?

Thanks in advance

Glenn

Is it the recording or replaying that is not working?

Hi Colin,

All seems to be working, but the bit I'm confused about is how to deliver the sound through to Dashboard. I have put a template on to try and deliver to my intended endpoint group.

Thanks

Glenn

Are you connecting to NR using a browser on the Pi or on another machine?
What node are you using to play the audio?
What version of NR?
What version of Node.js?
What browser?

The dashboard has an audio out node.... why not feed the wav (as a buffer) to that.

NR connecting as a browser (chrome) from phone
Play_Audio_File
NR Version/node.js 8.11.4

Thanks for coming back to me,

which node is this please?
The wav file buffer node I have has no output node

In the nodes panel scroll down to the Dashboard nodes and there you should see Audio Out.

Is that node more for text to speech?

Either, as it says in the info panel.

image

Thanks Colin,

Still no joy though. Nodes are as above. I am a little confused as to how the usb port for the microphone is assigned as the first node doesn't seem to require this information and I am getting no sound out when I go from my phone to the assigned group.

Glenn

You indicated previously that you were getting the wav file ok.

If not then which node are you using for the microphone (node-red-contrib-something)?

Hi Colin,

node-red-contrib-micropi

I used their example flow and on the "micropi" node, if I browse to the http://localhost:1880/getAudio url it will immediately download a wav file which I have played on my windows pc using VLC. So I assume the deom.wav file is working ok. However, I want it to buffer the sound through the dashboard ui.

Hope that makes sense.

Glenn

If it's already giving you a wav file in a buffer then feeding it direct to the audio out node should work

Hi dceejay,

I don't recognise your middle node.

Are you able to export the clipboard and tell me the node please?

Glen

Thats just a file in node (from Node-RED v 0.19) to read a test wav file I had on my pc - set to output contents as a single buffer. You may not need it if you are already getting a wav buffer direct from the mic

Ok, looks different on your node red version. Set up as stated and I get no sound what-so-ever. I've tried the absolute path - home/pi/audio/demo.wav and audio/demo.wav to no avail. I've looked at the demo.wav file and it hasn't been updated for sometime.

path must start with / to be absolute so /home/pi/audio/demo.wav etc

sorry, that is how I have it.

Still confused by how the node picks up which USB the microphone is attached to?