I was right, the problem was in the audioStream element for garbage collection, I downloaded the code from github and changed
this is:
var audio_context; var recorder; function startUserMedia(stream) { var input = audio_context.createMediaStreamSource(stream);
in
var audio_context; var recorder; var localStream;
so make sure that the stream
not garbage collected.
PS :
what should be noted
1: MP3 encoding / decoding technology may be regulated by MP3 patents in some countries. For commercial purposes, I would advise you to go the vorbis/ogg
path (also I think that the mp3 quality after converting from wav is bad).
2: I found another problem with an additional 50% silence in the recordings, but a solution for this is already available on the Internet, if I'm right.
Edit: I added a demo for this on github
source share