Cross-platform audio device enumeration library
Project description
Audio Devices for Azure Speech SDK
Cross-platform audio device enumeration library for Python.
Features
- List audio input/output devices with detailed information
- Filter devices by type (input, output, or all)
- Cross-platform support (Windows, macOS, Linux)
- Unified API across all platforms
- No external dependencies
Installation
# From source
git clone https://github.com/nohanaga/audio_devices.git
cd audio_devices
pip install -e .
# Or install from wheel (download from GitHub Releases)
pip install audio_devices-0.1.0-cp39-cp39-macosx_10_9_x86_64.whl
Usage
import audio_devices
# Basic device listing (name: uid format)
devices = audio_devices.list_device_uids()
for device in devices:
print(device)
# Detailed device information
device_details = audio_devices.list_device_details()
for device in device_details:
print(f"Name: {device['name']}")
print(f"UID: {device['uid']}")
print(f"Type: {device['device_type']}")
print(f"Input channels: {device['input_channels']}")
print(f"Output channels: {device['output_channels']}")
print(f"Manufacturer: {device['manufacturer']}")
print()
# Filter devices by type
input_devices = audio_devices.list_devices_by_type("input")
output_devices = audio_devices.list_devices_by_type("output")
all_devices = audio_devices.list_devices_by_type("all")
# Convenience functions
input_devices = audio_devices.get_input_devices()
output_devices = audio_devices.get_output_devices()
all_devices = audio_devices.get_all_devices()
# Print devices in a user-friendly format
audio_devices.print_devices()
audio_devices.print_devices_by_type("input")
# Get platform information
platform_info = audio_devices.get_platform_info()
print(f"Platform: {platform_info['platform']}")
print(f"Backend: {platform_info['backend']}")
# Backward compatibility
devices = audio_devices.list_audio_devices() # Same as list_device_uids()
Supported Platforms
- ✅ macOS: CoreAudio API
- ✅ Windows: WASAPI (Windows Audio Session API)
- ⚠️ Linux: Coming soon
API Reference
Core Functions
list_device_uids()- Returns device names and UIDs in "name: uid" formatlist_device_details()- Returns detailed device information as dictionarieslist_devices_by_type(device_type)- Filter devices by type ("all", "input", "output")
Convenience Functions
get_input_devices()- Get input devices onlyget_output_devices()- Get output devices onlyget_all_devices()- Get all devicesprint_devices()- Print all devices in user-friendly formatprint_devices_by_type(device_type)- Print filtered devicesget_platform_info()- Get platform and backend information
Device Information
Each device dictionary contains:
name- Device nameuid- Unique device identifierdevice_type- "input", "output", or "both"input_channels- Number of input channelsoutput_channels- Number of output channelsmanufacturer- Device manufacturer
Development
git clone https://github.com/nohanaga/audio_devices.git
cd audio_devices
pip install -e .
Building Wheels
Wheels are automatically built for multiple platforms using GitHub Actions:
- Windows:
win32,win_amd64 - macOS:
macosx_*_x86_64,macosx_*_arm64 - Linux:
linux_x86_64
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file audio_devices-0.2.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 17.2 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5724a2d0e8c07b7b1f9f79f0da6da9db75de5981aeb3e79e9b4e33cc920dcb5
|
|
| MD5 |
c8d268aab654b3e58e7e5c1e13832dd7
|
|
| BLAKE2b-256 |
a91744be9035a1219285d478c55acdb8b96cb2cca52cdf24177741cf42579992
|
File details
Details for the file audio_devices-0.2.0-cp311-cp311-win32.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp311-cp311-win32.whl
- Upload date:
- Size: 16.6 kB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4f9ec1813014f5545330b8085424a42d30c5966e630b69d758f1129e34b7a31
|
|
| MD5 |
9b01890fd8058c989e0856ced3f56e51
|
|
| BLAKE2b-256 |
a7d378abad8345c70607b6f109c00f9356c2a4918ed7726ae5abdad7bb1b870f
|
File details
Details for the file audio_devices-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.3 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad4c336d32cb98500d8e7458cceb4317385f7a4a4c58358f0e5014e1f799f6ee
|
|
| MD5 |
03eb0ae5f271abe98c1543de69f11681
|
|
| BLAKE2b-256 |
a567ec98f57da7e287685a0311714a155df43e7b06035e6829183372fb1162dc
|
File details
Details for the file audio_devices-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 11.1 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4950fe47392fa65bca2bbd1eb5351de462abb8f08d002a51eb24c4673827dc2a
|
|
| MD5 |
747b9f60ce01e7893e1e6d57c53c4f64
|
|
| BLAKE2b-256 |
8836f7f97bffac25bef38cbf71d47282eb1df9ee5aa9935e86bd3bcdab5ea983
|
File details
Details for the file audio_devices-0.2.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 17.2 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
800da3d000a5007fe84c5701052e5d38a506e49cd136afe4fb334ecb5ef0b9b9
|
|
| MD5 |
b492eaac6bd456da9563f72fc39a0448
|
|
| BLAKE2b-256 |
db4a4e3ceca9aa389d6922854cec7ba89953fce6dc5e779c3a2830f9be43220e
|
File details
Details for the file audio_devices-0.2.0-cp310-cp310-win32.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp310-cp310-win32.whl
- Upload date:
- Size: 16.6 kB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cf1946f9d81f79b258debb2c87e7d8f55832dbd6757a3173ec117ac823296dc
|
|
| MD5 |
2b84ca29ca05460d66042ad15cfa58f4
|
|
| BLAKE2b-256 |
7d1e62e070ef581c2952371b03990e65e2be9440fdcfbffc1713b94341975826
|
File details
Details for the file audio_devices-0.2.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.3 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e91a647482c9d751ab8f189dd89d8f1d727cabb6110b6dd98991d4e703e2a02
|
|
| MD5 |
4da38ab03fdb3ccce08651e86606c07d
|
|
| BLAKE2b-256 |
0d89162ee02919d868f23f89efd6113cd020bd0875c5971e02da4683359ca3c4
|
File details
Details for the file audio_devices-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 11.2 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96da93f2e2c89b7915631b58b5f02b24c99331a12252d8e1c0f45db1b26fd70a
|
|
| MD5 |
04e105f9c7e2db078f91f1ed0a64cafe
|
|
| BLAKE2b-256 |
0075bb5715283133729e71d475c18b48fde737b579dfe9e347a601a5f15bdc5b
|
File details
Details for the file audio_devices-0.2.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 17.2 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd0cdff01085adefb2dd41f9fc7d593857f044e1270a14038a405d7d64292f86
|
|
| MD5 |
69a906b586ef40c3724bfe438c0dbed0
|
|
| BLAKE2b-256 |
e41e4347c2e24005f2a22bd69330ae7750068db31348d65ca5180e33ddd213cd
|
File details
Details for the file audio_devices-0.2.0-cp39-cp39-win32.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp39-cp39-win32.whl
- Upload date:
- Size: 16.6 kB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbed28cd6934a8d4f7d11bf8bd8d2c406c38796612d5015a824c3da5bd585e64
|
|
| MD5 |
d544dd6d7a20c1a521d785bdc415ddd7
|
|
| BLAKE2b-256 |
f96adb6ba095c2aa0f5fb12c33a842f433d4c1b6e9b52ba68583ce8edf939167
|
File details
Details for the file audio_devices-0.2.0-cp39-cp39-macosx_11_0_arm64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.3 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
170ffbf709e05a48bd74f96fd994ba5d4a67350fcb4c27e0ebf2868ed11b4f3e
|
|
| MD5 |
cd8a676d307800137f64f6a5cf5f8dd9
|
|
| BLAKE2b-256 |
c23d72082edef838c650a660cec9b462a445ad433bef49f4a765263f1e034c06
|
File details
Details for the file audio_devices-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 11.1 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09293201a9c6fff22ea33b21ab56e9fca2603f1739262772640ac2a74c4005ac
|
|
| MD5 |
fc5b9df7b49d193031e543adc35b6bc7
|
|
| BLAKE2b-256 |
2d116638558eb6f5498d54dee1c9911cc7a32a10fdc95bca71199fe6c3645991
|
File details
Details for the file audio_devices-0.2.0-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 17.2 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3809f84690937289604810e662119ab49027bac9bca7065c3bd68ce57f331abe
|
|
| MD5 |
49a8cdb8b073d45f50979332434745c9
|
|
| BLAKE2b-256 |
0eb7d4276269d9a285e64df8250bf03fab0aa6f2efc3bb734c3d417837689f1f
|
File details
Details for the file audio_devices-0.2.0-cp38-cp38-win32.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp38-cp38-win32.whl
- Upload date:
- Size: 16.5 kB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a3817b4f555e6cfaf0028a9a8b3199a5fa2996cf3abe70b1c4f5f98610b69d9
|
|
| MD5 |
c99605dac7be40ab3a680a4c10eaf69c
|
|
| BLAKE2b-256 |
f59284a04f8bd0e728407eacde887244f0b3e87cbf2dd42299c159ba00e67851
|
File details
Details for the file audio_devices-0.2.0-cp38-cp38-macosx_11_0_arm64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.2 kB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e72f7e4dd931f59e7466371e789b5b7fa8977cb1c025c414032c56807ca347d8
|
|
| MD5 |
6c9001715a2e72a3034e2951779a1ba2
|
|
| BLAKE2b-256 |
79436d26b0eaeeba3eb88ec32dfe904b93a66394d575be97cdb2b7b51dc72f63
|
File details
Details for the file audio_devices-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl.
File metadata
- Download URL: audio_devices-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 11.1 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06e61c3f29f2844596a44baed5f46726eb3cbbb0913816554c47b0da70aecea6
|
|
| MD5 |
da85a1da8032622ab614c6ba2cfab421
|
|
| BLAKE2b-256 |
27d7afd03d77f9f25fb79d619ea8501deb02c3ab090b3409114c8aa43783961d
|