Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python read microphone

I am trying to make python grab data from my microphone, as I want to make a random generator which will use noise from it. So basically I don't want to record the sounds, but rather read it in as a datafile, but realtime.

I know that Labview can do this, but I dislike that framework and am trying to get better at python.

Any help/tips?

like image 684
Coolcrab Avatar asked Feb 01 '13 08:02

Coolcrab


People also ask

Is there any alternative for Pyaudio?

Is there any alternative for PyAudio? simpleaudio is strongly recommended, but pyaudio , ffplay , and avplay are alternative options.

How do I record audio in Python?

Recording AudioThe python-sounddevice and pyaudio libraries provide ways to record audio with Python. python-sounddevice records to NumPy arrays and pyaudio records to bytes objects. Both of these can be stored as WAV files using the scipy and wave libraries, respectively.


1 Answers

You may be interested by PyAudio. I think you can get some bytes from the stream.

Here is an interesting example

like image 123
luc Avatar answered Oct 18 '22 13:10

luc