Ayatullah Abdulhakim
Ayatullah Abdulhakim

Reputation: 43

How can i change audio file quality to be 16 bit, stereo 8000 Hz using recorder.js?

I am using recorder.js/recorderworker.js the resulted quality is 16 bit, stereo 441000 Hz, how can change it to be 16 bit, stereo 8000 Hz?

Upvotes: 0

Views: 542

Answers (2)

tranchau
tranchau

Reputation: 131

at file app.js you can config

audioContext = new AudioContext({sampleRate: 8000});

Upvotes: 0

Saqib
Saqib

Reputation: 7422

The constructor accepts a config object as the second parameter, as shown below. This will let you set it to stereo, and specify the sampling rate - but I'm not sure how to set it to 16bit (I believe this is the default).

var audioContext = new AudioContext();
var microphone = audioContext.createMediaStreamSource(stream);
recorder = new Recorder(microphone, { numChannels: 1, sampleRate: 8000 });

Upvotes: 0

Related Questions