Streaming audio to an icecast server

hello node-red community,

I'm willing to send an audio stream to an icecast server

I'd like to feed this audio stream with for example Text To Speech object and / or an audio source like another audio stream or file.

When I do that in script / bash, I use a ALSA sound loop virtual device https://www.alsa-project.org/main/index.php/Matrix:Module-aloop on which I can send an audio flux with sox/aplay and listen to this flux with ffmpeg which send the stream to icecast with a command like :

ffmpeg -ac 2 -f alsa -i hw:1,0 -acodec libmp3lame -ab 32k -ac 1 -content_type audio/mpeg -f mp3 icecast://source:********@mydomain.org:8000/mystream

This command works with an exec node, and if I try with another exec node the command :

aplay -l

It gives in the debug window (which is normal) :

msg.payload : string[678]
"**** List of PLAYBACK Hardware Devices ****↵card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]↵ Subdevices: 6/8↵ Subdevice #0: subdevice #0↵ Subdevice #1: subdevice #1↵ Subdevice #2: subdevice #2↵ Subdevice #3: subdevice #3↵ Subdevice #4: subdevice #4↵ Subdevice #5: subdevice #5↵ Subdevice #6: subdevice #6↵ Subdevice #7: subdevice #7↵card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]↵ Subdevices: 8/8↵ Subdevice #0: subdevice #0↵ Subdevice #1: subdevice #1↵ Subdevice #2: subdevice #2↵ Subdevice #3: subdevice #3↵ Subdevice #4: subdevice #4↵ Subdevice #5: subdevice #5↵ Subdevice #6: subdevice #6↵ Subdevice #7: subdevice #7↵"

but I didn't found any node or exec command that would allow me to manage an audio flux in node red and then send it to a virtual ALSA device so as to be streamed by the ffmpeg command.

Did anyone already manage to send an audio stream to icecast server ?
Did I missed an easier solution ?

I'm using Node Red 0.20.6 installed in a LXC ubuntu 18.04 container

Thanks
++
Benjamin