跳转到主要内容

Python核心音频Windows库

项目描述

pycaw

Tests Coverage Status PyPI release PyPI version

Python核心音频Windows库,适用于Python2和Python3。

安装

最新稳定版本

pip install pycaw

开发分支

pip install https://github.com/AndreMiras/pycaw/archive/develop.zip

系统要求

choco install visualcpp-build-tools

用法

from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
devices = AudioUtilities.GetSpeakers()
interface = devices.Activate(
    IAudioEndpointVolume._iid_, CLSCTX_ALL, None)
volume = interface.QueryInterface(IAudioEndpointVolume)
volume.GetMute()
volume.GetMasterVolumeLevel()
volume.GetVolumeRange()
volume.SetMasterVolumeLevel(-20.0, None)

示例目录中查看更多。

测试

测试目录中查看。

项目详情


下载文件

下载适合您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

pycaw-20240210.tar.gz (22.4 kB 查看哈希值)

上传时间:

构建分布

pycaw-20240210-py3-none-any.whl (24.8 kB 查看哈希值)

上传时间: Python 3

支持者:

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面