Plays audio files on Windows/MacOS/Linux
Project description
playaudio
pip install playaudio
A no dependency, cross platform solution for playing a sound in MacOS/Windows/Linux. This repo was inspired by playsound, but less buggy, way less dependencies, better tested and simpler. Under the hood this package calls out to a subprocess to play the sound, so don't expect this package to win any performance benchmarks. If you like this library then give it star, so that others can find it.
Install
Uses the built in system commands to play audio.
Usage
Python
from playaudio import playaudio
playaudio("my.mp3") # blocks until sound is played.
Command line
> pip install playaudio
> playaudio "my.mp3"
> playaudio # plays an included bell.mp3 sound.
Develop
PR's are welcome!
To develop software git clone the repo then run . ./activate.sh
Windows
This environment requires you to use git-bash
. This library expects a sound card to be installed. If you are running on a server then you will need to install a virtual sound card. See windows setup here.
Linting
Run ./lint.sh
to find linting errors using pylint
, flake8
and mypy
.
Releases:
- 1.0.1: Fix readme
- 1.0.0: Initial release
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
Hashes for playaudio-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cee3266f8b0adf51c53f7a6689abfdf59a1693292ce287cd8f6628fb7b5501d |
|
MD5 | 0d7a53c3977851919de8d6a2fc20c6d2 |
|
BLAKE2b-256 | 45cc806f29b24b4393322eec74b00d4b3263165fc2066f8f78d062912a06152a |