I have made a program that generates a blob (containing PCM data) from a recording using the new HTML5 getusermedia api however; these recordings can get pretty big and I hoped that the files could be compressed before sending them to the server. I know that mp3/ogg compression is way out of what a browser can handle (i think) so I looked elsewhere.
Some people talk about http compression (that would also use Gzip) but isn’t that a browser-server decision when setting up communication?
I found https://github.com/olle/lz77-kit; it has a javascript implementation for the client and php for the server but would this even make sensor for audio?
Does anybody have any experience with compressing audio on the client side (without using flash)
Since you are using
getUserMedia, I suppose that you want to record speech from a user’s microphone.Audio-specific compression algorithms should be much more efficient than general data compression algorithms. The downside of audio codes, such as MP3, are, that they are lossy.
Now, Speex might be a good codec for you. And as it happens, there is a full JavaScript Speex encoder/decoder, complete with example: speex.js.