OiO.lk Blog javascript Webm audio blob to Wav file Js
javascript

Webm audio blob to Wav file Js


i’m trying to convert a webm blob to a wav audio file.

The webm file : no problem to get it from a recorder audio stream

const url = URL.createObjectURL(recording);
const anchor = document.createElement("a");
var filename="audio.webm";
anchor.download =filename;
anchor.href = url;
anchor.click();
window.URL.revokeObjectURL(url);

I think it’s about the stereo channel of the buffer…

I tried this but it does not work :

const arrayBuffer = await new Response(recording).arrayBuffer();
const blob = new Blob([arrayBuffer], { type: "audio/wav" });

I can’t use npm package…

Thanks for your help.



You need to sign in to view this answers

Exit mobile version