I am wondering if there is a way to use python to mute and microphone? I am working on a project that requires the Microphone setting to be set to "Listen to this device". However, to prevent the Microphone from picking up unwanted noise from a TV or radio, I need a way to toggle between Mute and Unmute through a python script.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Django __str__ returned non-string (type NoneType)
- Evil ctypes hack in python
PyAudio is one cross-platform option for this. It's more than just direct access to the audio device controls, so it's moderately complicated to use. pymedia is another option, the
pymedia.audio.sound
package provides access to the mixer devices which is where the controls for the microphone (input level, mute etc.) would be.