Audio buffer to chart/graph

I'm new to using node-red and I've been working on an audio monitoring using nodemcu, mqtt and node-red and have been wondering if its possible to graph the audio (think spectogram) using the buffer that I receive from the nodemcu.

Or, is there any other way to graph the audio and show it to the dashboard?

What is in the buffer?

Not entirely sure what this is. I have no access to my computer right now so an image from a week ago is all I can show you.

I'm new to this stuff and can't understand any technical mumbo jumbo.

Well we can't really help you to chart it unless you can tell us what the data coming from the nodemcu is. So I think you need to find that out first.

Some quick thoughts:

  • As Colin already explained you need to figure out first which data is stored in the buffers.
  • You will have to decide how you want to visualise the data: amplitude in time / frequency spectrum / frequency in time / ...
  • You will have to decide where the calculations need to be done:
    • in your Node-RED flow on the server: you only have to send the results of your calculations (e.g. frequency spectrum) to the client, i.e. less data transfer. But if you e.g. want to creat an audio heat map, that might be a bit difficult in NodeJs since image manipulation is not fully supported in plain Javascript (i.e. some C++ libraries are needed I think).
    • in your dashboard on the client (i.e. in the browser): you will need to send all the audio samples to the client (which results in lots of data transfer). But if you are going to play the audio sound in your dashboard, you will have the audio samples in the browser available anyway. And then you can use the web audio api to visualise it, which seems to be easier ...

Bart

1 Like