Hi I've rewritten your code using and audioWorklet from Chromium team. I've also created a React hook: https://github.com/ttessarolo/useAudioDetection