Python中的麦克风访问 [英] Microphone access in Python

查看:449
本文介绍了Python中的麦克风访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用Python访问用户麦克风吗?

Can I access a users microphone in Python?

对不起,我忘了不是每个人都是心灵读者: Windows至少为XP,但对Vista的支持非常好.

Sorry I forgot not everyone is a mind reader: Windows at minimum XP but Vista support would be VERY good.

推荐答案

最好的解决方法是使用ctypes库并从中使用WinMM. mixerOpen将打开一个麦克风设备,您可以从那里轻松读取数据.应该非常简单.

Best way to go about it would be to use the ctypes library and use WinMM from that. mixerOpen will open a microphone device and you can read the data easily from there. Should be very straightforward.

这篇关于Python中的麦克风访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆