Python Core Audio Windows Library
Project description
pycaw
Python Core Audio Windows Library, working for both Python2 and Python3.
Install
Latest stable release:
pip install pycaw
Development branch:
pip install https://github.com/AndreMiras/pycaw/archive/develop.zip
System requirements:
choco install visualcpp-build-tools
Usage
from ctypes import cast, POINTER
from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
devices = AudioUtilities.GetSpeakers()
interface = devices.Activate(
IAudioEndpointVolume._iid_, CLSCTX_ALL, None)
volume = cast(interface, POINTER(IAudioEndpointVolume))
volume.GetMute()
volume.GetMasterVolumeLevel()
volume.GetVolumeRange()
volume.SetMasterVolumeLevel(-20.0, None)
See more in the examples directory.
Tests
See in the tests directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycaw-20230322.tar.gz
(22.2 kB
view hashes)
Built Distribution
pycaw-20230322-py3-none-any.whl
(24.6 kB
view hashes)