pipewire_python:
Project description
Python controller with pipewire
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
- 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:
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.
- Python 3.7+
- Ubuntu 20.04+
Tutorial
from pipewire_python.pipewirecontroller import Player
import asyncio
# Download sample audio
#########################
# PLAYBACK #
#########################
# normal way
player = Player()
player.play_wav_file('docs/beers.wav',
verbose=True)
# async way
player = Player()
asyncio.run(player.play_wav_file_async('docs/beers.wav',
verbose=True))
#########################
# RECORD [default=5sec] #
#########################
# normal way
player = Player()
player.record_wav_file('docs/5sec_record.wav',
verbose=True)
# async way
player = Player()
asyncio.run(player.record_wav_file_async('docs/5sec_record.wav',
verbose=True))
Pipewire's API implementation
- Play
pw-play
- Record
pw-record
- Cat
pw-cat
- JACK-servers
pw-jack
-
pw-mon
dumps and monitors the state of the PipeWire daemon -
pw-dot
can dump a graph of the pipeline, check out the help for how to do this. -
pw-top
monitors the real-time status of the graph. This is handy to find out what clients are running and how much DSP resources they use. -
pw-dump
dumps the state of the PipeWire daemon in JSON format. This can be used to find out the properties and parameters of the objects in the PipeWire daemon.
Availability
- Pypi package
- CI/CD implementation
- GUI controller
All APIS here
More info here
Contributions
PR, FR and issues are welcome.
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 Distribution
pipewire_python-0.0.6.tar.gz
(1.2 MB
view hashes)
Built Distribution
Close
Hashes for pipewire_python-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d47aa11e1e9dc1a301721ba779514fb555a7819d744ba051f6d3f16e61570be7 |
|
MD5 | 8cb68ae2037a9f711b3895708e3774c7 |
|
BLAKE2b-256 | ef8aa30d5da4059a02da795b281d84e35dd947fa2ce633884a7790a2e261bda1 |