I have an audio file/blob that has been created using the MediaRecorder
api:
let recorder = new MediaRecorder(this.stream)
let data = [];
recorder.ondataavailable = event => data.push(event.data);
and then later when the recording is finished:
let superBlob = new Blob(data, { type: "video/webm" });
How can I use this blob to create an AudioBuffer
? I need to either :
- Transform the
Blob
object into anArrayBuffer
which I could use withAudioContext.decodeAudioData
(returns anAudioBuffer
) or - Transform the
Blob
object into anFloat32Array
, where I could copy it into theAudioBuffer
withAudioBuffer.copyToChannel()
Any tips on how to achieve that are appreciated. Cheers!
fileReader.result
always returns an emptyArrayBuffer
- do you know what could be happening? Further details can be found in this question that I asked – Bik