If one wants to record sound from the microphone input in the browser one can do so today through Flash. (Afaik there is currently no other good option which works across browsers.)
Is there a simple swf-plugin which allows one to do so? That is, with the options "Start recording", "Stop recording", "Get wave of recorded sound (or similar)".
This question is a little old, but I recently had to answer this myself and found the following article most useful:
http://www.html5rocks.com/en/tutorials/getusermedia/intro/
With HTML 5 you can avoid Flash altogether and simply use
<input type="file" accept="audio/*;capture=microphone">
This mitigate the reliance on Flash (as you say you were concerned about cross browser compatibility) and is still understood by most up to date desktop and mobile browsers.
You can do it easily since FlashPlayer 10.1 with SampleData (event) from Microphone.
microphoneInstance = Microphone.getMicrophone();
microphoneInstance.addEventListener(SampleDataEvent.SAMPLE_DATA, sampleDataHandler);
//will contains your microphone RAW sound data
buffer = new ByteArray();
function sampleDataHandler(event:SampleDataEvent):void
{
while(event.data.bytesAvailable > 0)
buffer.writeFloat(event.data.readFloat());
}
An example (with code), recording locally (without any server) and save a WAV file:
MicRecorder, a tiny microphone library by Thibault Imbert MicRecorder - A tiny AS3 Microphone library on Google Code
An other example (without code), recording locally also but save a MP3 file:
http://unitzeroone.com/labs/rtmic2mp3/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With