Converting WAV to any compressed audio format in client-side JavaScript
I've made an audio recorder that records to mp3 directly from the browser combining RecorderJS and libmp3lame.js
You can find the gitHub project here:https://github.com/nusofthq/Recordmp3js
and a more detailed explanation of the implementation:http://nusofthq.com/blog/recording-mp3-using-only-html5-and-javascript-recordmp3-js/
What you really want is the mediaStream "Recording API", which is currently being worked on. Until that's available, I advise using emscriptem on C/C++ source, and consider running it in a webworker to avoid blocking the UI and other tabs.
I was facing the same problem and came up with quite a quick and dirty solution:
- zip the wav-file with zip.js (works with Chrome, Firefox, Safari 6 and Internet Explorer 10)
Further intel see Documentation zip.js
At least this is reducing size a lot, file is about >75% smaller so 1:4 compression
UPDATE: Maybe have a look at this: https://webrtc.github.io/samples/
It is a Chat Application for Chrome and Firefox developed by google, I assume with kind of CC-License