Basic audio analyser which reports the peak sound level.

peakLevel(level => {
console.log(level);
});

Note: Browers won't allow microphone access unless the call has come from a user-interaction, eg pointerup event handler.