views:

754

answers:

2

A groups of friends are working on a little game that would listen to the microphone as part of the interaction. We've tinkered with processing and flex. What we'd like to know is if anyone has succeeded in:

  1. recording from the microphone using a web app
  2. performing an FFT on this microphone data

In the case of flex, according to the docs "Because sound data from a microphone...do not pass through the global SoundMixer object, the SoundMixer.computeSpectrum() method will not return data from those sources."[1]

+1  A: 

Your footnote kind of answered your own question. :) No, it is not possible to read the raw bytes from the microphone from the client side. It is possible that Adobe will implement this in Flash 11, but don't hold your breath for it.

If you set up a flash server, such as Red5, then you can read the raw stream on the backend and send FFT data back to the client over AMF. This is actually possible to do with very low latency, though it may still be too high depending on the nature of your application. There are several examples on the Red5 page about how to accomplish things similar to this using a Java webapp working on the backend.

Nik Reiman
+1  A: 

There is a lot of people requesting this feature.

You may see many workaround in getMicrophone().

Andy Li
There will be raw microphone access feature coming in AIR 2.0 http://theflashblog.com/?p=1426
Andy Li