Microphone access from Dashboard

#1

I am creating a chatbot and I want to be able to talk to the chatbot through the dashboard.

I have tried the microphone node with the utils package and then using STT my bot understand the message perfectly but I need to start the recording from the node red canvas... I want to be able to click a button on my dashboard to talk to the bot.

Is this possible?
Thanks

#2

Hi Sandra,

You didn't say which microphone node you are using, so I went looking for what is available in the flows library... it looks like the node-red-contrib-browser-utils provides a dashboard widget the start/stop button built-in:

Microphone

The browser starts recording after the button next to the node is clicked and stops it when the button is clicked again. The node outputs it as a WAV buffer.

1 Like
#3

Hi!

I am using the node-red-contrib-browser-utils package for the microphone.

The problem is I need to start recording from the node red editor. I want to do it from the dashboard.
This flow works, but I want to add a button on my dashboard to start and stop the recording.

#4

If you look at node-red-contrib-mic you will see you can send an action to it to start/stop recording. So you could have a button on the dashboard connected to a chage node that would set the action which is connected to the node.

1 Like
#5

That works in my local node red. I did have to install sox in my Mac otherwise it kept crashing.

How do I make it run on the cloud?
I am using IBM Cloud Node-red boilerplate and when I click on start my app crashes :frowning:

#6

Let's clarify where these various nodes capture their audio.

node-red-contrib-mic can be used to access the microphone on the device running Node-RED - the audio capture happens in the runtime. That isn't going to work when running in the cloud.

node-red-contrib-browser-utils provides a node that lets you capture audio from the microphone on the device running the browser you have opened the node-red editor in.

Neither of these nodes can be used to capture audio from a node-red-dashboard ui. To do that, you'd need to use a ui_template node to insert some custom javascript that can be used to do the audio capture when triggered. I'm sure someone must have done that - but I can't find an example at the moment.

Capturing audio in the browser is a bit fiddly, but very doable. You could use the browser-utils node as a guide for what you'd need to do - https://github.com/ibm-early-programs/node-red-contrib-browser-utils/blob/master/microphone/microphone.html

Node allowing for live chat(talk) and live sound