How to convert microphone audio input to LINEAR16 BASE64 encoding using javascript

I am using the google cloud speech API to convert speech to text using a microphone. I get an arraybuffer audio, now I need to convert it to base64 base16 string in Javascript. Please suggest if possible.

+4
source share
1 answer

The audio buffer data is in the Float32 (PCM 32-bit data) bit format, which must be converted to int16 (Linear16). directly from the buffer

Then you can convert the data to base64.

0
source

Source: https://habr.com/ru/post/1653317/


All Articles