sivaprakashDesingu / react-voice-recorder

This (react-voice-recorder) is a JavaScript library for React Applicaiton which will be used to record voice as audio and download the same.

Home Page:https://codesandbox.io/s/react-voice-recorder-mydov?file=/src/App.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Audio blob file record conversion for mp3?

sharadkamal opened this issue · comments

Hi thanks for creating this package been working with it for a while works awesome as per my requirement, mate currently the output audio is given as a blob file, is there a way to implement audio file conversion to conventional audio types like mp3?

I have implemented the audio upload functionality as follows. unfortunately, the recording cut shorts the last part of audio and presents an error in wmp. Is this a known issue?

handleAudioUpload(file) {
console.log(file)

const url = window.URL.createObjectURL(file)
const click = document.createEvent('Event')
click.initEvent('click', true, true)
const link = document.createElement('A')
link.href = url
link.download = 'output.mp3'
link.dispatchEvent(click)
link.click()
return link

}

@prajakta930
Sorry for the inconvenience.. Team come up with the fix for the issue you raise. You can try with version 2.1.0.

Hence i am closing this issue.