aF.
aF.

Reputation: 66697

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

I want to see if there is a microphone active using Python.

How can I do it?

Thanks in advance!

Upvotes: 1

Views: 2547

Answers (2)

aF.
aF.

Reputation: 66697

This is what I wanted:

import ctypes
from ctypes import *

winmm= windll.winmm
print 'waveInGetNumDevs=',winmm.waveInGetNumDevs()

Upvotes: 2

mikerobi
mikerobi

Reputation: 20878

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.

Upvotes: 4

Related Questions