Skip to main content

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:

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

simpleaudiocontroller-2.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simpleaudiocontroller-2.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file simpleaudiocontroller-2.1.0.tar.gz.

File metadata

  • Download URL: simpleaudiocontroller-2.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for simpleaudiocontroller-2.1.0.tar.gz
Algorithm Hash digest
SHA256 a5aa5feb8ff543b3b987cfd3be1dbac39d39cbead14fbf2b10033d12df754752
MD5 055bd13fa6e864853ba85c9a04e76d07
BLAKE2b-256 6ab6e19e4600ebfd48150c850dcbeab555988444aecda4c7f3ac9ff0aa6b9ee3

See more details on using hashes here.

File details

Details for the file simpleaudiocontroller-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for simpleaudiocontroller-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c6f4b84fe76cca834a0f74f5ae83cbe4f135854622aef5afafa03cbc246a297
MD5 db0134dadfc81a121a4486003a40bd98
BLAKE2b-256 9c2cc50b08241da244916a8ffa1df2953986d24cf82929aa746fa634dfdc1802

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page