Skip to content
/ pycaw Public
forked from AndreMiras/pycaw

Python Core Audio Windows Library

License

Notifications You must be signed in to change notification settings

alebzk/pycaw

 
 

Repository files navigation

pycaw

Build Status PyPI version

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 visualcppbuildtools

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.

About

Python Core Audio Windows Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%