TL;DR : here's a plugin to access the microphone via Flash, encode the WAV in MP3 or OGG, and it gives you back a base64 string that represent the audio file.
<img src="https://dl.dropbox.com/u/1412774/MicrophoneC2Demo2/demo.png" border="0">
In the HTML5 draft, the browsers vendors are planning the use of the Microphone device.
However, we can hope that in two or three years from now, that the HTML5 spec would be advanced enough to allow that.
For the moment, here's a plugin that uses a Flash fallback to grab the Mic, and compress the WAV to MP3 and OGG.
Once that audio is recorded, you can insert it as a base64 string with the Base64 Audio plugin : http://www.scirra.com/forum/plugin-base64-audio_topic52192_post328265.html#328265.
The OGG encoder is modded to avoid a full memory clear and reload between each encoding, the MP3 encoder still need to reload itself between each encoding. That means the MP3 encoding part is usually faster than the OGG encoding on the first encoding, but it's slower on the following encoding.
I need to change the Shine encoder, however the change is heavier, because I need to have a proper Alchemy-encoding gcc installed, and it's not simple...
To do its job, the Flash part of the plugin display a Security Panel to allow the access to the microphone. That panel is shown and hidden when you need it. (On the HTML side, to hide the panel, I just set the width & height to 1 pixel, because a truly hidden div with a Flash inside won't execute any Flash if it's hidden). To avoid the "dead pixel" effect of that 1 pixel wide div when you want it hidden, you can set the color background of that div, to let it better blend inside your game.
Since I didn't have the time to add a check to get the proper name of the browser, you need to encode the MP3 or OGG accordingly to the browser brand (Firefox won't play a MP3, Chrome will play both, Opera won't play OGG, and so on...).
The code of the encoder is going to be published on GitHub, to let you be sure that the code can be trusted (I'll publish everything back from my holidays).
The MP3 encoder is the Shine MP3 encoder ported to Flash, and the OGG encoder is from there : http://labs.byhook.com/2011/02/15/ogg-vorbis-encoder-for-flash-alchemy-series-part-1/
The demo : https://dl.dropbox.com/u/1412774/MicrophoneC2Demo2/index.html
The .zip : https://dl.dropbox.com/u/1412774/MicrophoneC2Demo2/pode_microphone.1.0.zip
The .capx : https://dl.dropbox.com/u/1412774/MicrophoneC2Demo2/MicrophoneC2Demo2.capx