Pycaw (Python Core Audio Windows)
Pycaw is a Python library designed exclusively for controlling audio devices on Windows systems. It allows programmatic access to audio sessions, volume control, and sound device management on the Windows platform.
Note: Pycaw does not support macOS or Linux. It is built specifically for Windows using Core Audio APIs. If you're looking for similar functionality on other platforms, you'll need alternative libraries.
Pycaw currently supports Python 3.10 through 3.14 on Windows. Supported Python versions are stable, non-EOL releases that have passed the project's Windows test matrix; newer Python releases are added after compatibility validation.
Install
Latest stable release:
pip install pycaw
Development branch:
pip install https://github.com/AndreMiras/pycaw/archive/main.zip
System requirements:
choco install visualcpp-build-tools
Usage
from pycaw.pycaw import AudioUtilities
device = AudioUtilities.GetSpeakers()
volume = device.EndpointVolume
print(f"Audio output: {device.FriendlyName}")
print(f"- Muted: {bool(volume.GetMute())}")
print(f"- Volume level: {volume.GetMasterVolumeLevel()} dB")
print(f"- Volume range: {volume.GetVolumeRange()[0]} dB - {volume.GetVolumeRange()[1]} dB")
volume.SetMasterVolumeLevel(-20.0, None)
# or work with the 0-100 scale the Windows volume mixer uses:
print(f"- Volume: {device.volume_percent:.0f}%")
device.volume_percent = 50
See more in the examples directory or visit the documentation.
Tests
Create the locked contributor environment and run the compatibility suite. uv
uses .python-version to install/select Python 3.14 and supplies reproducible
tools; Tox handles compatibility isolation.
uv sync --locked
uv run tox
Tox remains responsible for isolating the Python 3.10-3.14 minimum/current dependency matrix. To run one interpreter's lanes, use for example:
uv run tox -e py314-minimum,py314-current
Documentation and release tools are opt-in groups:
uv sync --locked --no-default-groups --group docs
uv run --no-sync sphinx-build -M html docs/source docs/_build
uv sync --locked --only-group release
uv run --no-sync python -m build
uv run --no-sync python -m twine check dist/*
Check or apply Ruff through the locked Tox environments:
uv run tox -e lint-check
uv run tox -e lint-format
Maintainers with a separately installed Tox and the tox-uv plugin can still run
the equivalent tox commands directly. See the tests directory for
the test suite.
The dependency files serve distinct purposes. [project].dependencies in
pyproject.toml declares inclusive lower bounds for consumers;
requirements.txt exactly pins the supported minimum test lane; Tox's current
lane deliberately resolves the newest runtime dependencies; and uv.lock
reproduces normal contributor tools. The lock supplements rather than replaces
the minimum/current compatibility matrix.
Metadata
Release files for pycaw 20260926
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pycaw-20260926.tar.gz | 29.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pycaw-20260926-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.1 kB
Release files / pycaw-20260926.tar.gz
| Download URL | pycaw-20260926.tar.gz |
|---|---|
| Size | 29.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
544dd603e680b1374daff2a9f9288e376dd7157ad6619b80a26821b6214c11b7
|
|
BLAKE2b-256 checksum How to use checksums |
d940e655e5f27db94faeb623daae5ef3dc321980f45aa281d80b6a3aa542e338
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / pycaw-20260926-py3-none-any.whl
| Download URL | pycaw-20260926-py3-none-any.whl |
|---|---|
| Size | 28.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7ee3a0e34afdd14b65cc895e9d3ec15485aa064658c673c2eeccbe3c52fc1ed
|
|
BLAKE2b-256 checksum How to use checksums |
4089b7c078c2b5b93abffd2ee65f1a4d771b694ea81235e60e20e761f78361d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency log