Recorderjs icon indicating copy to clipboard operation
Recorderjs copied to clipboard

Recording file is too large, how to make it small?

Open Qulei93 opened this issue 8 years ago • 2 comments

Qulei93 avatar Feb 16 '17 03:02 Qulei93

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})

Source

octavn avatar Jul 12 '18 12:07 octavn

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))

liadbelad avatar Jan 05 '21 10:01 liadbelad