How to see if there is one microphone active using python?

浪尽此生 提交于 2019-12-02 04:36:44

Microphones are analog devices, most api's probably couldn't even tell you if there is a microphone plugged in, your computer just reads data from one of your soundcards input channels.

What you probably want to know is if the input channels are turned on or off. Determining that is highly platform specific.

This is what I wanted:

import ctypes
from ctypes import *

winmm= windll.winmm
print 'waveInGetNumDevs=',winmm.waveInGetNumDevs()
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!