Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138163

Audio Stream from Microphone Pitch Shift (Web Audio API)

$
0
0

I've been trying to take an Audio Input Stream (my microphone) and apply effects to it, such as pitch shifting, reverb, etc. Is there anyway to do this, and what modifications to my code would allow me to do these things? Here is my code:

navigator.getUserMedia({audio: true}, function(stream) {
    var ac = new AudioContext();
    var audio = new Audio();
    var microphone = ac.createMediaStreamSource(stream);
    var dest = ac.createMediaStreamDestination();
    microphone.connect(dest);

    audio.srcObject = dest.stream;

    audio.setSinkId(settings.output);
    audio.play();
}, function (){console.warn("Error getting audio stream from getUserMedia")});

So far it's outputting the microphone to a specific audio output device. Thanks in advance!


Viewing all articles
Browse latest Browse all 138163

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>