Can somebody guide me through the process of embedding an audio recording widget on my site, where people can record short (~5 secs) voice clips? I have absolutely no experience with Flash but since HTML5 is not there yet, it's necessary.
-
1if you want to save these recordings you'll also need a server-side component - flash can only grab the microphone input for you ... check this: http://stackoverflow.com/questions/2734139/as3-microphone-recording-saving-works-in-flash-pcm-playback-double-speed – Philipp Kyeck Jul 15 '11 at 09:20
3 Answers
@pkyeck No, you can record audio and save it all on the client without a server. Check out this guy's blog, I used his code and modified it. It records audio and saves mp3's on your hard drive. I modified the code for my personal use and added a timeout. Unfortunately you need to learn some Flash to modify the code, but it's really easy to pick up.
He posts the source code on the 6th comment on his blog.
Edit: To "guide you to embed the audio into your site", just load this guy's source code into Flash CS5.5 Professional and publish to an HTML file, and then grab the generated code and put it into your website. If you don't have CS5.5 Professional it's worth the money, but you can also download a free trial from Adobe's website.

- 5,482
- 3
- 36
- 44

- 352
- 3
- 15
There are 3 ways to embed audio recording in a website:
- Record using Flash and upload to a web server, works on desktop (the @Stefan way)
Flash captures the mic sound data, stores it in RAM as wav, converts it to mp3 using mp3 conversion library and then uploads it to the web server using POST and a server side upload script.
This method is recommended for short recordings.
- Record using Flash and a media server, works on desktop (the @pkyeck way)
Flash captures the mic data, encodes it using builtin audio codecs (Nellymoser ASAO and Speex) and streams it to a media server (Red5 is free and open source, Wowza, etc.) where it is saved in .flv files.
Because the data is streamed this method is recommended for long recordings. If the computer/browser crashes you do not loose any recorded data.
Both of the above methods allow you to limit the recording time.
- Use HTML Media Capture, mobile only, iOS does not support sound only
HTML Media Capture works on mobile by bringing up the OS' native audio recording app to record the audio and then upload the file to the web server. Depending on the device you'll end up with .3ga or .mov files.
Here's how it looks on Android:
Note: Mobile Safari on iOS9 and previous versions will bring up the native photos/video recording app when using HTML Media Capture to record audio.
You can limit the recording time to 5 seconds on desktop. Unfortunately on mobile it is not possible.
Example voice recording apps that you can actually embed:
- http://www.jordansthings.com/blog/?p=5 implements 1
- http://audior.ec implements 1 on desktop and 3 on mobile
- http://flvar.com uses the streaming to a media server (2) method.

- 634
- 6
- 13
It depends upon where you want to record the audio. If you want the audio to be recorded and saved to the visitors computer then Stefan is right, but if you want to audio file to be saved on yours server then you need the server side Flash software, or red5 which is an open source alternative. You can also use various embeddable plugins that will let you record to the plugin's server which can then be acessed from your page. http://cooltoolsforschools.wikispaces.com/Audio+Tools

- 11
- 1
-
2Hi Timothy, no you do not. Instead of writing to the hard drive, you take the audio stream and make a POST call in the actionscript to your server, and then using php, perl or whatever server side scripting and save it there. – Stefan Jun 21 '13 at 15:25