Skip to main content

## Description

Project description

PIPEWIRE's python controller

PyPI Version Build Status publish_docs publish_pypi PyPI Supported Python Versions codecov Maintainability Test Coverage

JOIN OUR TELEGRAM SUPPORT:

Telegram

ONLY AUDIO BY NOW [PR & FR WELCOME]


Python controller, player and recorder via pipewire's commands.

  • Pipewire is a project that aims to greatly improve handling of audio and video under Linux. (Better than pulseaudio or jack)

Requirements

  1. A pipewire version installed (clean or via pulseaudio) is needed, to check if you have pipewire installed and running, run this command, if the output is different, you'll need to install pipewire:

    1. Pipewire versions supported: 0.3.30, 0.3.32+
pw-cli info 0
# Example output
    id: 0
    permissions: rwxm
    type: PipeWire:Interface:Core/3
    cookie: 134115873
    user-name: "user"
    host-name: "user"
    version: "0.3.30" # Possibly more actual than this version
    name: "pipewire-0"
...

To uninstall pipewire clic here.

  1. Python 3.7+
  2. Ubuntu 20.04+

Install & Tutorial

Install

pip3 install pipewire_python # or pip

Tutorial

from pipewire_python.controller import Controller

# [PLAYBACK]: normal way
audio_controller = Controller(verbose=True)
audio_controller.set_config(rate=384000,
                            channels=2,
                            _format='f64',
                            volume=0.98,
                            quality=4)
audio_controller.playback(audio_filename='docs/beers.wav')

# [RECORD]: normal way
audio_controller = Controller(verbose=True)
audio_controller.record(audio_filename='docs/5sec_record.wav',
                        timeout_seconds=5)

Documentation

You can check the automatic builded documentation HERE

Roadmap

Future implementations, next steps, API implementation and Control over pipewire directly from python in the ROADMAP.

Contributions

PR, FR and issues are welcome. Changes with PR in dev branch please due documentation runs after each commit in main branch. Check more here

License

LICENSE

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

pipewire_python-0.0.94.tar.gz (1.3 MB view hashes)

Uploaded Source

Built Distribution

pipewire_python-0.0.94-py3-none-any.whl (11.7 kB view hashes)

Uploaded Python 3

Supported by

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