Recorderjs
Recorderjs copied to clipboard
Recording file is too large, how to make it small?
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:
rec = new Recorder(input,{numChannels:1})
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))