birdofpreyru/react-native-audio

Question: Сhunks flow

Closed this issue · 1 comments

Hello! Can you clarify some questions? I got a Buffer and doing something like this


const chunks = [];

chunks.push(chunk);

const base64 = Buffer.concat(chunks).toString('base64');

and got a data MIME type: audio/octet-stream

How I can transfer this data to audio/wav for example? In the last step the data must looks like a
data:audio/wav;base64,AAAAAAAAAAAAAA....

It's possible do it on the React Native or I must using a server & data transformers?

This library generates audio chunks in PCM format. How to convert PCM audio data into WAV format, and what is the best way to do it, I don't know out of my head.