Skip to content Skip to sidebar Skip to footer

Mute Microphone In Speakers But Still Be Able To Analyze (createAnalyser) With Web Audio Api?

Im trying to create an Analyser node to get the signal from a microphone, and be able to create a graphic with the received input. But I dont want to the speakers to still recive t

Solution 1:

Add a gain node after the analyser node and set its value to 0. So..

var volume = context.createGain();
volume.gain.value = 0;

microphone.connect(analyser);
analyser.connect(volume);
volume.connect(context.destination);

Solution 2:

Actually, you don't even need to connect the analyser. It should process without being connected to the destination.


Post a Comment for "Mute Microphone In Speakers But Still Be Able To Analyze (createAnalyser) With Web Audio Api?"