Convert AudioBuffer to ArrayBuffer / Blob for WAV Download
问题 I'd like to convert an AudioBuffer to a Blob so that I can create an ObjectURL from it and then download the audio file. let rec = new Recorder(async(chunks) => { var blob = new Blob(chunks, { type: 'audio/mp3' }); var arrayBuffer = await blob.arrayBuffer(); const audioContext = new AudioContext() await audioContext.decodeAudioData(arrayBuffer, (audioBuffer) => { // How to I now convert the AudioBuffer into an ArrayBuffer => Blob ? } 回答1: An AudioBuffer contains non-interleaved Float32Array