soundplay
playsound, but modern!
Installation
Install via pip:
$ pip install soundplay
Done.
If you insist on the (slightly) harder way of installing, from source, you know how to do it already and don’t need my help.
The latest version of the source code can be found at: https://github.com/paxcoder/soundplay
Quick Start
Once you’ve installed, you can really quickly verified that it works with just this:
>>> from soundplay import playsound
>>> playsound('/path/to/a/sound/file/you/want/to/play.mp3')
Documentation
The soundplay is working like playsound. contains only one thing - the function ( named) playsound.
It requires one argument - the path to the file with the sound you’d like to play. This may be a local file, or a URL.
There’s an optional second argument, block, which is set to True by default. Setting it to False makes the function run asynchronously.
On Windows, uses windll.winmm. WAVE and MP3 have been tested and are known to work. Other file formats may work as well.
On OS X, uses AppKit.NSSound. WAVE and MP3 have been tested and are known to work. In general, anything QuickTime can play, playsound should be able to play, for OS X.
On Linux, uses GStreamer. Known to work on Ubuntu 14.04 and ElementaryOS Loki. I expect any Linux distro with a standard gnome desktop experience should work. Copyright ——— This software is Copyright (c) 2021 Taylor Marks <taylor@marksfam.com>.
See the bundled LICENSE file for more information.
Metadata
Release files for soundplay 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| soundplay-1.3.1.tar.gz | 530.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| soundplay-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 537.0 kB
Release files / soundplay-1.3.1.tar.gz
| Download URL | soundplay-1.3.1.tar.gz |
|---|---|
| Size | 530.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b02f14cad0e3d9904c1a9bc8ec54c70e90321a29d7041936779899d019e14942
|
|
BLAKE2b-256 checksum How to use checksums |
0b60e49b68e41aebdc384b60a32c88c7821d2cb123a3c30d28ddc1e8c1094ed9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / soundplay-1.3.1-py3-none-any.whl
| Download URL | soundplay-1.3.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c636ff6379ae35f7ad2fc2cbf85fe6a52da678f113c505450cbad727c4aad75d
|
|
BLAKE2b-256 checksum How to use checksums |
f7e7f9d751079a8b2792262b64feb087fa87358cce6772f57868996cab1bd180
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|