views:

2860

answers:

8

I'm trying to write a web-app that records WAV files (eg: from the user's microphone). I know Javascript alone can not do this, but I'm interested in the least proprietary method to augment my Javascript with. My targeted browsers are Firefox for PC and Mac (so no ActiveX). Please share your experiences with this. I gather it can be done with Flash (but not as a WAV formated file). I gather it can be done with Java (but not without code-signing). Are these the only options?

@dominic-mazzoni I'd like to record the file as a WAV because because the purpose of the webapp will be to assemble a library of good quality short soundbites. I estimate upload will be 50 MB, which is well worth it for the quality. The app will only be used on our intranet.

UPDATE: There's now an alternate solution thanks to JetPack's upcoming Audio API: See https://wiki.mozilla.org/Labs/Jetpack/JEP/18

+1  A: 

Flash is going to be your best solution.

Hopefully this will help: http://www.kirupa.com/forum/showthread.php?t=17331

dawnerd
A: 

Yes I believe Flash or a Java-Applet are the only ways to do that. Since you cannot interact with a microphone you must use some sort of browser-plugin, its the only way to use the microphone. I'm not aware of any other plugin that would provide that features. A quick search on Google did not reveal any further possibilities. I think the easiest would be going with Flash.

+1  A: 

Your only options are Flash, Java, ActiveX, or writing a custom Firefox extension. Flash is probably your best option - you could write or use an existing Flash app to do the recording and keep almost everything else in pure Javascript.

Why do you want a WAV file? If you're planning to process the actual bits of the waveform on the client, then that's probably a bad idea; the client might be really slow and you wouldn't be able to really manipulate the file. If you want to send the sound back to the server, then it's much better to send a compressed file, and then uncompress it on the server.

dmazzoni
+1  A: 

Flash requires you to use a media server (note: I'm still using Flash MX, but a quick Google search brings up documentation for Flash CS3 that seems to concur - note that Flash CS4 is out soon, might change then). Macromedia / Adobe aim to flog you their media server, but the Red5 open-source project might be suitible for your project:

http://osflash.org/red5

I think Java is going to be more suitible. I've seen an applet that might do what you want over on Moodle (an open-source virtual learning environment):

http://64.233.183.104/search?q=cache:k27rcY8QNWoJ:moodle.org/mod/forum/discuss.php%3Fd%3D51231+moodlespeex&hl=en&ct=clnk&cd=1&gl=uk

(membership-required site, but open to Google, hence the link goes to the Google cache page).

David Hicks
A: 

You could download Real Producer Basic, which is free here (http://forms.real.com/rnforms/products/tools/producerbasic/), and imbed it as an activeX object since it's on your intranet. Flash will embed the same way, it's on all the office workstations, but since this is your Intranet, you could install it on all the machines with AD. Real audio files are very small compared to wav and sound great. Here's a link to the Real Sudio ActiveX how-to guide. http://service.real.com/help/library/guides/activex/producerx.html

Mike
A: 

I am also interested in knowing this question. my question would BE if it is possible with ASP.NET?

Sam
A: 

This is a paid solution but it will do what you are looking for.

http://www.javasonics.com/

Charles Himmer
A: 

Another solution if you don't mind your users installing a plugin is to use Runtime Revolution RevWeb plugin which supports recording audio in browser (and is trivial to implement, I made a test applet to confirm this in about 10 minutes). http://revweb.runrev.com/