Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
743 views
in Technique[技术] by (71.8m points)

Changing microphone volume using Python, Windows 10

Since Microsoft Teams tends to change my audio setting, I want to write a code that will set everything back to normal. I've already figured out how to fix the application volume level but I'm stuck at the microphone volume level.

I haven't been able to find any example codes for changing mic volume using Python. I've looked into Microsoft registry if I could try to change it through that, no luck.

Any suggestions on how to change the microphone volume level in Python?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

you could give a try with:

Python-sounddeviceProvides bindings for the PortAudio library and a few convenience functions to play and record NumPy arrays containing audio signals. Here an example code to plot the microphone signal.

or

Pyaudio. Provides Python bindings for PortAudio, the cross-platform audio I/O library. With PyAudio, you can easily use Python to play and record audio on a variety of platforms, such as GNU/Linux, Microsoft Windows, and Apple Mac OS X / macOS.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...