Recordmp3js
Recordmp3js copied to clipboard
Uncaught RangeError: Invalid array buffer length
Hi,
Thank you for this great plugin. Unfortunately I have a problem which I can't figure out. On some computers it works great, however on others when the recorded wav is passed to the libmp3lame, to I get the following error: Uncaught RangeError: Invalid array buffer length
I have discovered that the error occurs only when a user records microphone with a high sample rate of 192000. When I try it on my mac with 44000 input, it works.
How can it be fixed? Very important issue...
Thanks
This is a limitation of the javascript mp3 library.
You can try and recompile the library using emscripten: http://kripken.github.io/emscripten-site/docs/getting_started/Tutorial.html, and increase the buffer size, but i don't know exactly what results you will get. In anyway 44000 or 48000 sample rate is more than enough for a mono mp3.
I don't mind converting in 44000 or 48000. The question is how I can convert the recorded audio to lower sample rate?
Thanks
How is it possible to make this plugin work for all devices? It just doesn't work on PCs on which the recording configuration is high like 192000. I will appreciate any help.
@lightmar did you find how to reduce the sample rate?
@lightmar @michelboudali yeah it doesnt work for me too on windows machine when i try to record in 32kbps bitrate. 64kbps works on windows and 32 works on mac.. any fix for this. I would like to record with 32kbps to keep the size low.