Open Qulei93 opened 7 years ago
Hey I got the same issue I am trying to record a audio/wav in 44.100 mono but I always get stereo
Here's my code snippet:
const audioContext = new (window.AudioContext || window.webkitAudioContext)({ sampleRate: 44100, })
const recorder = new Recorder(audioContext, { numChannels: 1, })
navigator.mediaDevices .getUserMedia({ audio: true }) .then((stream) => { recorder.init(stream) }) .catch((err) => console.log('Uh oh... unable to get stream...', err))
Recorder.js records 2 channel by default. You can halve the size by recording mono audio instead. You can do it from the constructor like this:
Source