pycaw
Python Core Audio Windows Library
What it is and what it does
Pycaw is a Windows-only Python library that exposes the Windows Core Audio API for programmatic control of audio devices and sessions. It lets you query audio devices, read and set volume levels (in decibels), check mute state, and manage sound device properties directly from Python code. The library wraps low-level COM interfaces through comtypes and relies on psutil for system integration.
Typical use cases include building audio control panels, automating volume adjustments in applications, monitoring audio device state, or integrating audio management into larger Windows automation scripts. Because it is Windows-specific and built on COM interfaces, it has no equivalents on macOS or Linux and is not portable across platforms.
Use it for:
- Automate volume control in Windows desktop applications or scripts without user interaction
- Query and monitor the state of audio devices and sessions for diagnostics or logging
- Build custom audio control interfaces or dashboards that interact with Windows speakers and microphones
- Integrate audio device management into Windows system automation or testing workflows
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Pycaw provides programmatic control of Windows audio devices, sessions, and volume levels through Python bindings to the Windows Core Audio API.
Yes, if you are building Windows-only audio control features and need programmatic access to Core Audio APIs. The package is actively maintained, has low install friction, and no known vulnerabilities. The main caveat is the unclear license—verify the repository's license terms before use. Not suitable for cross-platform projects.
Install
pycaw on PyPI
pip
pip install pycawuv
uv add pycawpoetry
poetry add pycawInstalling pycaw
Before you install
Installation is straightforward with low friction; the package depends on comtypes and psutil, both stable and widely available. Maintenance is active with a recent release (295 days ago) and ongoing commits.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before use in proprietary or restricted projects.
Quickstart
pip install pycaw
from pycaw.pycaw import AudioUtilities
device = AudioUtilities.GetSpeakers()
volume = device.EndpointVolume
print(f"Volume level: {volume.GetMasterVolumeLevel()} dB")
volume.SetMasterVolumeLevel(-20.0, None)
Windows-only; requires Visual C++ build tools (e.g., via `choco install visualcpp-build-tools`). Not supported on macOS or Linux.
Verify before relying
- Exact Python version support (requires_python is unspecified in metadata)
- Whether comtypes and psutil are automatically installed or must be pre-installed
- Full scope of audio session and device management beyond volume control
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — comtypes, psutil |
| Maintenance | actively maintained — 295 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 175,658/month — #10,263 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pycaw-20251023-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pulsectlProvides a high-level Python interface to…
permissive · top 15,000 on PyPI
pydubPydub provides a high-level Python interface…
permissive · top 5,000 on PyPI
wiimwiim provides a Python API to discover,…
permissive · top 15,000 on PyPI
sonos-websocketAsync Python library for communicating with…
permissive · top 15,000 on PyPI
pyfmodexPyfmodex provides Python bindings to the FMOD…
permissive · top 15,000 on PyPI
PyAudioPyAudio provides Python bindings for PortAudio…
permissive · top 5,000 on PyPI
python-songpalPython library for controlling Sony audio…
copyleft · top 15,000 on PyPI
SoundCardSoundCard plays and records audio across Linux,…
permissive · top 15,000 on PyPI
python-oscpython-osc implements Open Sound Control (OSC)…
unclear · top 15,000 on PyPI