Stream audio between 2 node red sessions

Hi

I have 2 node-red sessions running on 2 different raspberry
RPI1 has a USB microphone
RPI2 has speakers

Any suggestion on how to stream sound from RPI1 to RPI2 ?

Cheers
Pierre

Hello,
If you want to do it with nodered it is possible with node-red-contrib-sox-utils (disclaimer it is one of my nodes).
But it's probably not the best solution as you will probably not get 100% smooth playback and a little bit of delay.
Just set a sox microphone node to raw streaming, set up a web socket connection between the two pi's, send the raw stream over the web socket and than connect a sox play node set to raw streaming playback on the web socket out of the other pi.
If you want smooth low latency playback though I would highly recommend looking at specialized audio solutions outside nodered like snapcast.

Johannes

1 Like

Hello

Thanks, i'll have a look at sox and snapcast

For the web socket, what node would you use ? I don't know if i have to use the http one, or tcp or udp..
I guess mqtt is not relevant in this case anyway ?

Pierre

There is a dedicated websocket node you can use @bierre2000.
I have used mqtt for similar purposes before but i dont know if it wouldn’t add more latency to the mix.

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