How to do realtime audio analysis with playback in NodeJs?

Viewed 3534

So here is my problem. I want to play audio from nodejs running on a raspberry Pi and then adjust the brightness of an LED strip also connected to the same PI based on the frequency readings from the audio file. However I can't seem to find anything in node that gives the same functionality as the WebAudio API AnalyserNode.

I found a few libraries (https://www.npmjs.com/package/audio-render) that come close and are based on Web Audio API but the frequency values it produces are completely incorrect. I verified this by comparing it to a browser version I created using the Web Audio API.

I need the audio to play from node while also being analyzed to affect the brightness levels.

Any help would be appreciated. I really thought this would be simpler to handle in node but 6 hours later and I'm still without a solution.

1 Answers
Related