Node allowing for live chat(talk) and live sound

Hi,
Think you should start with searching for existing information on this forum. But then it will still be a challenge, because I don't think anyone has ever created a full setup. If I just could buy somewhere some free time ...

You can find my experiment here to capture audio from an USB microphone on Raspberry. Summarized:

  1. Use the Microphone node from the node-red-contrib-micropi suite. In that node you have to specify the number of channels, bits per sample ... And then this node injects chunks of raw audio samples into Node-RED.
  2. You can send those audio chunks across the wires in your Node-RED flow.
  3. As soon as you tell some node what those audio samples represent (since they only see a huge chunks of bytes), you can use my node-red-contrib-wav node which adds a header to the raw audio. In my node you again have to specify the same configuration (number of channels ...) as you have entered in the micropi node above.
  4. If you send those wav chunks to the audio-out node (i.e. to the dashboard), that won't work since the audio-out node doesn't support streaming. As I already explained in my above post.

That is another issue, which I haven't tried yet. But from this discussion you see that this is again a black hole in the dashboard.

The WEB audio API is quite a hell to get running smooth. The smallest gap in the audio results in very annoying distortions. But at the moment the MediaSource API is supported by all major browsers.
And that API has all kind of audio streaming stuff out-of-the-box [available]. It would be great to have a node-red-contrib-ui-mediasource node to offer this kind of stuff in the dashboard. Unless somebody volunteers to build such a node, you will have until I have time. But I have already promised lots of stuff to other users, and I can't keep them waiting ...

[EDIT] : even when you have reached a very small success in your flows, please post here what you have achieved so we all can learn from it ..

[EDIT] : in this article you can see what I mean. When you have a gap in your audio (i.e. no samples because your next sample arrived a little bit too late in your browser), then you will get a small period of 'silence'. But the transition from sound to silence is to steep (which you will hear very well!):

image

But the MediaSource API will make those transitions smoother automatically ...