PDA

View Full Version : Real Time Audio Data


lomendil
06-02-2008, 01:08 AM
A few years ago, someone posted (http://www.worldviz.com/forum/showpost.php?p=673&postcount=1) about getting audio data in from a microphone. A comment was made that realtime audio collection would be worked on for the next version (that was 2.5).

I haven't seen any further discussion about this in the forums (though I could have failed to search effectively). Is anyone aware if this task is more possible now than it was then?

I'm aware of the vizmic module, but I would really love to record to memory.

What would work well, is if vizmic.startRecording took a file-like object instead of just a filename string. Then you could use a StringIO object and all would be well.

farshizzo
06-02-2008, 08:06 PM
The vizmic module only allows getting the current monitor level of the audio. It does not support recording the raw data to memory. I did a quick search and there seems to be some 3rd party Python libraries that support this, like PyAudio (http://people.csail.mit.edu/hubert/pyaudio/).

lomendil
06-02-2008, 08:18 PM
Thanks for the reply. The "super duper alpha" comment on the pyaudio sute made me a bit weary of that one. I just wanted to check, since I'd like to minimize third party requirements. But I'll go ahead and use something like pyaudio then.

Thanks again!