Skip to main content

Pycaw (Python Core Audio Windows)

Tests Coverage Status PyPI release PyPI version

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.

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 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)

See more in the examples directory.

Tests

See in the tests directory.

Metadata

Release files for pycaw 20251023

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycaw 20251023
File Size Uploaded
pycaw-20251023.tar.gz 23.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycaw 20251023
File Interpreter ABI Platform
pycaw-20251023-py3-none-any.whl Python 3 none any Details

Total release size: 49.3 kB

Release files / pycaw-20251023.tar.gz

Download URL pycaw-20251023.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
19935b92eb5efc3f3ea5ee8a2d37ca49009e9dc00f83d067b74b9922e84b5b3b
BLAKE2b-256 checksum
How to use checksums
d18119181e3118a503f94d8689fbbed60616e85d08cee3a295c11245ae73018f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / pycaw-20251023-py3-none-any.whl

Download URL pycaw-20251023-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef06d234a2fe3c175925a2a8c7ed8824e450851014fdb7d900af1b56ce422d4e
BLAKE2b-256 checksum
How to use checksums
ffbcf60c1622da5c53770c2d62457b5b6fc9623ab41b9d276269b857cd337e22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release history Release notifications | RSS feed

This release

20251023 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page