Stream from UI microphone over MQTT

I am wondering if is it possible to edit node-red-ui-nodes/node-red-node-ui-microphone to send raw data buffer over mqtt. I would like to set package size (or hardcoded it) and when buffer is full send it over mqtt or just provide it in msg.payload. Current implementation allow only start/stop recording and after that send recorded file, but I want to send chunk of recorded data continuously during recording (like audio stream). Can anyone can confirm if is it possible?

Why don't you give it a try? you could do it all in one flow.
First find a node to play the audio. Once you get that working, send the output of the ui-microphone to an mqtt-out node.
Add a mqtt-in node - subscribing to the topic you published with - and feed that to the node you found to play the audiio.

Let us know how it goes.

That's not what I mean. I do not know if it is possible from ui-microphone point. Current implementation of that node record voice and after stop prepare data ready to process. I am not sure if web browser provide such possibility to stream it. I would like to provide continuously sending chunk of data during "recording" process - in experiment I would like to build some walkie-talkie. But have not enough knowledge to determine if it is possible

Well unless I try it and see what happens I can’t help you, but you could try it and tell me what results.

I don’t think you are going to get the results you hope for due to the nodes processing the data, network delays and such. But the only way to tell is to try it.

It is feasible to do at the JavaScript level, but the ui-microphone node is not implemented to do streaming of audio.

@patlas This might do what you need
Its not using the dashboard but I just put together a flow that allows you to have walkie talkies in a browser with a custom webpage and websockets using Node-RED as the backend. Its based on some code from an old project.
If someone had the time and inclination then they could possibly turn that webpage into a dashboard node.


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.