# playaudio
`pip install playaudio`
A cross platform solution for playing a sound in MacOS/Windows/Linux.
[![MacOS_Tests](https://github.com/zackees/playaudio/actions/workflows/push_macos.yml/badge.svg)](https://github.com/zackees/playaudio/actions/workflows/push_macos.yml)
[![Ubuntu_Tests](https://github.com/zackees/playaudio/actions/workflows/push_ubuntu.yml/badge.svg)](https://github.com/zackees/playaudio/actions/workflows/push_ubuntu.yml)
[![Win_Tests](https://github.com/zackees/playaudio/actions/workflows/push_win.yml/badge.svg)](https://github.com/zackees/playaudio/actions/workflows/push_win.yml)
[![Linting](https://github.com/zackees/playaudio/actions/workflows/lint.yml/badge.svg)](https://github.com/zackees/playaudio/actions/workflows/lint.yml)
## Install
Uses the built in system commands to play audio.
# Usage
### Python
```python
from playaudio import playaudio
playaudio("my.mp3") # blocks until sound is played.
```
### Command line
```bash
> 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](.github/workflows/push_win.yml).
# Linting
Run `./lint.sh` to find linting errors using `pylint`, `flake8` and `mypy`.
# Releases:
* 1.0.4: Windows: Supports playing mp3 files
* 1.0.3: Adds ignore_errors=True for playaudio()
* 1.0.2: BELL_FILE -> BELL_MP3
* 1.0.1: Fix readme
* 1.0.0: Initial release
Raw data
{
"_id": null,
"home_page": "https://github.com/zackees/playaudio",
"name": "playaudio",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "playaudio,audio,sound",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/af/2c/4ac6f89730627313a7dd63a7a1740cdef5bbcc865abc871c68cce623d619/playaudio-1.0.5.tar.gz",
"platform": null,
"description": "# playaudio\r\n\r\n`pip install playaudio`\r\n\r\nA cross platform solution for playing a sound in MacOS/Windows/Linux.\r\n\r\n[![MacOS_Tests](https://github.com/zackees/playaudio/actions/workflows/push_macos.yml/badge.svg)](https://github.com/zackees/playaudio/actions/workflows/push_macos.yml)\r\n[![Ubuntu_Tests](https://github.com/zackees/playaudio/actions/workflows/push_ubuntu.yml/badge.svg)](https://github.com/zackees/playaudio/actions/workflows/push_ubuntu.yml)\r\n[![Win_Tests](https://github.com/zackees/playaudio/actions/workflows/push_win.yml/badge.svg)](https://github.com/zackees/playaudio/actions/workflows/push_win.yml)\r\n\r\n[![Linting](https://github.com/zackees/playaudio/actions/workflows/lint.yml/badge.svg)](https://github.com/zackees/playaudio/actions/workflows/lint.yml)\r\n\r\n## Install\r\n\r\nUses the built in system commands to play audio.\r\n\r\n# Usage\r\n\r\n### Python\r\n\r\n```python\r\nfrom playaudio import playaudio\r\nplayaudio(\"my.mp3\") # blocks until sound is played.\r\n```\r\n\r\n### Command line\r\n\r\n```bash\r\n> pip install playaudio\r\n> playaudio \"my.mp3\"\r\n> playaudio # plays an included bell.mp3 sound.\r\n```\r\n\r\n# Develop\r\n\r\nPR's are welcome!\r\n\r\nTo develop software git clone the repo then run `. ./activate.sh`\r\n\r\n# Windows\r\n\r\nThis 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](.github/workflows/push_win.yml).\r\n\r\n# Linting\r\n\r\nRun `./lint.sh` to find linting errors using `pylint`, `flake8` and `mypy`.\r\n\r\n\r\n# Releases:\r\n * 1.0.4: Windows: Supports playing mp3 files\r\n * 1.0.3: Adds ignore_errors=True for playaudio()\r\n * 1.0.2: BELL_FILE -> BELL_MP3\r\n * 1.0.1: Fix readme\r\n * 1.0.0: Initial release\r\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "Plays audio files on Windows/MacOS/Linux",
"version": "1.0.5",
"split_keywords": [
"playaudio",
"audio",
"sound"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "33be140a909687d23d0bceb606a3c42f98efb34e758d3edd38dd48feb3d21893",
"md5": "1db6ee1a55550189900571f3cefc5160",
"sha256": "ef7d33bdbdbd682452d4f2522a4e92bf8190a87077a4e33b635f2c095b4cd246"
},
"downloads": -1,
"filename": "playaudio-1.0.5-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "1db6ee1a55550189900571f3cefc5160",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 81680,
"upload_time": "2023-04-03T18:51:30",
"upload_time_iso_8601": "2023-04-03T18:51:30.901163Z",
"url": "https://files.pythonhosted.org/packages/33/be/140a909687d23d0bceb606a3c42f98efb34e758d3edd38dd48feb3d21893/playaudio-1.0.5-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "af2c4ac6f89730627313a7dd63a7a1740cdef5bbcc865abc871c68cce623d619",
"md5": "ac55acf3d8f79a4f4be941ba14eacb15",
"sha256": "f862502f096a127783ccfba61fdd0703324f715f15433581900dc1045479bce6"
},
"downloads": -1,
"filename": "playaudio-1.0.5.tar.gz",
"has_sig": false,
"md5_digest": "ac55acf3d8f79a4f4be941ba14eacb15",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 87905,
"upload_time": "2023-04-03T18:51:33",
"upload_time_iso_8601": "2023-04-03T18:51:33.098057Z",
"url": "https://files.pythonhosted.org/packages/af/2c/4ac6f89730627313a7dd63a7a1740cdef5bbcc865abc871c68cce623d619/playaudio-1.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-03 18:51:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "zackees",
"github_project": "playaudio",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "playaudio"
}