Simple interface for controlling audio devices
Project description
# Simple Audio Controller
The Simple Audio Controller is a Python module that provides a simple interface for interacting with audio devices and controlling audio settings using the PulseAudio command-line tool 'pacmd'.
## Features
- List available headphones and microphones.
- Set default audio devices (headphones and microphones).
- Retrieve information about the current default devices.
- Search for audio devices by name.
## Requirements
- Python 3.x
- PulseAudio (pacmd command-line tool)
## Installation
You can install the Simple Audio Controller using pip:
```bash
pip install simpleaudiocontroller
Usage
Here's how you can use the Simple Audio Controller in your Python code:
from simpleaudiocontroller import AudioController
# Create an instance of the AudioController
audio_controller = AudioController()
# List available headphones and microphones
headphones = audio_controller.get_headphones()
microphones = audio_controller.get_microphones()
# Set the default headphone device
if audio_controller.set_default_device(headphones[0]):
print("Default headphone set successfully.")
# Set the default microphone device
if audio_controller.set_default_device(microphones[0]):
print("Default microphone set successfully.")
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for simpleaudiocontroller-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d32cacf9b14edbc49f5e45da995dddf1f0887e94755f772cae837848a9835fc |
|
MD5 | a7bba70deed9c57da25c1d2f00b757bf |
|
BLAKE2b-256 | 8063a882dc85a42904656d13e2619acd912ddb1142becd4b1c46f172d2efc896 |
Close
Hashes for simpleaudiocontroller-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d890d095631bdd0c07378c9830e0dcf4353007ae4bf20658a616da858507a939 |
|
MD5 | 590d0d2a0ed5eef3bbe9abf8c025d4d8 |
|
BLAKE2b-256 | b61c9f2a09148e75ce80c6cd17cb228357186da3e6838197bbf6d78680af0256 |