开发者

What is the easiest way to access a a computers microphone in Python?

开发者 https://www.devze.com 2023-01-06 20:24 出处:网络
I need to get some numbers so I can generate random numbers using ambient sound. I want something on this level

I need to get some numbers so I can generate random numbers using ambient sound.

I want something on this level pseudo code:

import microphone
p = pitch.get()
print p

Edit:

This i开发者_如何学JAVAs in Windows 7, BTW


Depends on the platform. On Windows, this SO question has some answers; for Linux, try this one instead.


I don't know if it is as easy as you would like but I know that it is possible to access the microphone with tksnack. I think it is available on main platforms.

microphone access should be possible with the record method of the Sound class

I hope it helps

0

精彩评论

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