Recorderjs
Recorderjs copied to clipboard
Export to other format than wav
Hello,
I tried to export to an other format than wav. I thought, if I would use an other mime type for the Blob the browser convert the data, if the file type is known and supported. But nothing happen. Its always a wav file. I tested the created file with an ogg tool. I know that the filename in the example always ends to wav. Is there any way to export the recorded audio as ogg without implementing an encoding function?
Heh. No. Recorderjs has built-in WAV encoding, and any lossy encoding like ogg would be a larger undertaking. Changing the MIME type is irrelevant, the data being returned will always be WAV-encoded.
Is there any way to use libmp3lame.js to convert the PCM data to MP3?
you can change .wav to .mp3(whatever you want) inside createDownloadLink() function in javascript
This will not produce MP3...
You can changee like this hf.download = new Date().toISOString() + '.mp3'; this recorderjs working in firefox?
This will indeed create a .mp3 file, but it will still contain WAV audio.
You should use this script to get mp3. But you'll have to load a new library (+900kb). Think if it's necessary to increase library size.
There is a function of exportWAV() in javascript. It accepts two arguments. First is function and second is format. If you skip second argument it will take wav format by default. But to get audio in another format try to pass "audio/mp3" as second argument to get mp3 format.