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
Blobobject into anArrayBufferwhich I could use withAudioContext.decodeAudioData(returns anAudioBuffer) or - Transform the
Blobobject into anFloat32Array, where I could copy it into theAudioBufferwithAudioBuffer.copyToChannel()
Any tips on how to achieve that are appreciated. Cheers!