one-line version of my question: How can I record lossless ( or at the least, incredibly high quality ) audio in a web browser? Preferably chrome/chromium since I would like to make a high quality audio-recording electron application.
Note, this question was asked 8 years ago, but I'm trying to find a modern 2022 solution: High Quality Audio Recording in Web Browser
I have tried using getUserMedia()
to record audio in javascript, even specifying audio quality variables like so:
var constraints = {
audio: true,
"mandatory": {
//sampleSize: 32,
//sampleRate
channelCount: 2,
//autoGainControl: false,
//noiseSuppression: false,
//echoCancellation: false,
"googEchoCancellation": "false",
"googAutoGainControl": "false",
"googNoiseSuppression": "false",
"googHighpassFilter": "false"
},
video: false
};
This code is in my repo: https://github.com/MartinBarker/simple-web-audio-recorder-demo The audio recording works but comes out still very low quality: windows file browser says the saved wav file is 705kbps, Spek shows it as being 16bit, 1411kbps, 44100Hz, 1 channel, and the file sounds awful.
Compare that to audacity, recording using the same microphone on the same computer, I can output a wav file that is signed 32 bit, with windows saying it has a bitrate of 2822kbps, and Spek showing a 32bit, 2822kbps, 44100hz, 2channel file which sounds great.
I am trying to record a wav file in my chrome browser with similar quality to audacity, is this even possible? Are there any other web libraries which could help me reach this goal?