Can I access a users microphone in Python?
Sorry I forgot not everyone is a mind reader: Windows at minimum XP but Vista support would be VERY good.
Recognition of Spoken Words Google-Speech-API − It can be installed by using the command pip install google-api-python-client. Pyaudio − It can be installed by using pip install Pyaudio command. SpeechRecognition − This package can be installed by using pip install SpeechRecognition.
The way 0x180000 is generated is by doing (0xFFFF + 1) * 24 . So for all the keycodes there you must do (0xFFFF + 1) * keycode to get that number. For some reason the win32 devs believe mute means toggle. This happens also with APPCOMMAND_VOLUME_MUTE which toggles sound instead of muting.
I got the job done with pyaudio
It comes with a binary installer for windows and there's even an example on how to record through the microphone and save to a wave file. Nice! I used it on Windows XP, not sure how it will do on Vista though, sorry.
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.
You might try SWMixer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With