开发者

Accessing the Microphone in Python

开发者 https://www.devze.com 2023-01-04 08:17 出处:网络
My laptop has a microphone in it. Is th开发者_运维百科ere any method of obtaining numbers in Python from it? For example pitch, volume, or the duration of a noise. I\'m trying to use ambient noise to

My laptop has a microphone in it. Is th开发者_运维百科ere any method of obtaining numbers in Python from it? For example pitch, volume, or the duration of a noise. I'm trying to use ambient noise to create random numbers.


Accessing the amplitude is easy. Depending on the plattform your app is running on you can use a framework like http://people.csail.mit.edu/hubert/pyaudio/ or http://pyalsaaudio.sourceforge.net/pyalsaaudio.html

to access the the pitch you will need a framework that performs a fft-analysis like the scipy/numpy package

0

精彩评论

暂无评论...
验证码 换一张
取 消