Play Sound from USB Microphone

#1

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

How to pass audio chunks through a Node-RED flow
#2

Is it the recording or replaying that is not working?

#3

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

#4

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?

#5

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

#6

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

#7

Thanks for coming back to me,

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

#8

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

#9

Is that node more for text to speech?

#10

Either, as it says in the info panel.

#11

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

#12

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

#13

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

#14

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

#15

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

#16

Hi dceejay,

I don't recognise your middle node.

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

Glen

#17

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

#18

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.

#19

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

#20

sorry, that is how I have it.

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