How to get current system volume with nodeJS

Viewed 897

Image of What I want to get

I want to get the current system volume, not the one that is set by the user, but the one that is actively happening, for example if I am speaking to someone in a discord chat, and he's talking quietly it will show me 10%, but if he's talking loudly, it will jump to 80. I searched everywhere but all I get is using the microphone, and I want the sounds from the system, what can I do to get it?

1 Answers

You could try the package win-audio:

const audio = require('win-audio');
 
// speaker volume
const speaker = audio.speaker;
// get the current volume percentage
var currentVolume = speaker.get();

// microphone volume
const microphone = audio.mic;
Related