'Creating a wav file from a blob
I'm using the audio-react-recorder library to record audio from a user that want to eventually send to my back-end (as a wav-file). The react-recorder is generating a blob ({blob: Blob, url: 'blob:http://localhost:3000/c572ac68-6b7c-4992-b134-947df05ef32b', type: 'audio/wav'}) but I am unsure on how to convert it to a .wav file to be sent to the back-end. What I've tried so far:
let f = new File([audio], 'test.wav', { lastModified: new Date().getTime(), type: audio.type });
which causes an error when I try to pass to the API (wit.ai) I'm using. Also when I try to download this file, it is unplayable so I assume I'm not creating the file properly.
Any ideas how to properly create the .wav file from the blob?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
