I want to store the audio chunks sent to websocket via mediastream in nodejs. Currently file is getting generated but with no idea my thinking is the headers are not getting retrieved properly from the first data I am receiving.
ws.on("message", function incoming(message) {
if (!(message instanceof Buffer)) {
console.error("❌ Invalid message format: expected Buffer");
return;
}
console.log(`