Playsound - PyPI

Skip to main content Switch to mobile version Search PyPI Search playsound 1.3.0

pip install playsound Copy PIP instructions

Latest version

Released: Jul 24, 2021

Pure Python, cross platform, single function module with no dependencies for playing sounds.

Navigation

  • Project description
  • Release history
  • Download files

Verified details

These details have been verified by PyPI
Maintainers
Avatar for TaylorSMarks from gravatar.com TaylorSMarks

Unverified details

These details have not been verified by PyPI
Project links
  • Homepage
Meta
  • License: MIT License (MIT)
  • Author: Taylor Marks
  • Tags sound, playsound, music, wave, wav, mp3, media, song, play, audio
Classifiers
  • Development Status
    • 5 - Production/Stable
  • Intended Audience
    • Developers
  • License
    • OSI Approved :: MIT License
  • Operating System
    • OS Independent
  • Programming Language
    • Python :: 2
    • Python :: 2.3
    • Python :: 2.4
    • Python :: 2.5
    • Python :: 2.6
    • Python :: 2.7
    • Python :: 3
    • Python :: 3.1
    • Python :: 3.2
    • Python :: 3.3
    • Python :: 3.4
    • Python :: 3.5
    • Python :: 3.6
    • Python :: 3.7
    • Python :: 3.8
    • Python :: 3.9
  • Topic
    • Multimedia :: Sound/Audio :: MIDI
    • Multimedia :: Sound/Audio :: Players
    • Multimedia :: Sound/Audio :: Players :: MP3
  • Project description
  • Project details
  • Release history
  • Download files

Project description

Pure Python, cross platform, single function module with no dependencies for playing sounds.

Installation

Install via pip:

$pipinstallplaysound

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/TaylorSMarks/playsound

Quick Start

Once you’ve installed, you can really quickly verified that it works with just this:

>>> from playsound import playsound>>> playsound('/path/to/a/sound/file/you/want/to/play.mp3')

Documentation

The playsound module contains only one thing - the function (also 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.

If you’d like other Linux distros (or any other OS) to work, submit a PR adding in support for it, but please make sure it passes the tests (see below).

Testing

Playsound includes a small set of tests - if you’re making a PR, please ensure that you have no regressions and all the tests pass on your local system. Also make sure that Travis-CI, which runs these tests against Windows Server 2016, macOS 10.11 (El Capitan, 2015) and 11.3 (Big Sur, 2020), Ubuntu 14 (Trusty), and Ubuntu 18 (Bionic), for both Python 2.7 and 3.9, fully passes. You can check the Travis-CI status for Playsound here: https://travis-ci.com/github/TaylorSMarks/playsound/builds

Copyright

This software is Copyright (c) 2021 Taylor Marks <taylor@marksfam.com>.

See the bundled LICENSE file for more information.

Project details

Verified details

These details have been verified by PyPI
Maintainers
Avatar for TaylorSMarks from gravatar.com TaylorSMarks

Unverified details

These details have not been verified by PyPI
Project links
  • Homepage
Meta
  • License: MIT License (MIT)
  • Author: Taylor Marks
  • Tags sound, playsound, music, wave, wav, mp3, media, song, play, audio
Classifiers
  • Development Status
    • 5 - Production/Stable
  • Intended Audience
    • Developers
  • License
    • OSI Approved :: MIT License
  • Operating System
    • OS Independent
  • Programming Language
    • Python :: 2
    • Python :: 2.3
    • Python :: 2.4
    • Python :: 2.5
    • Python :: 2.6
    • Python :: 2.7
    • Python :: 3
    • Python :: 3.1
    • Python :: 3.2
    • Python :: 3.3
    • Python :: 3.4
    • Python :: 3.5
    • Python :: 3.6
    • Python :: 3.7
    • Python :: 3.8
    • Python :: 3.9
  • Topic
    • Multimedia :: Sound/Audio :: MIDI
    • Multimedia :: Sound/Audio :: Players
    • Multimedia :: Sound/Audio :: Players :: MP3

Release history Release notifications | RSS feed

This version

1.3.0

Jul 24, 2021

1.2.2

Jun 29, 2017

1.2.1

Feb 28, 2016

1.2.0

Feb 20, 2016

1.1.0

Jan 27, 2016

1.0.0

Jan 25, 2016

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

playsound-1.3.0.tar.gz (7.7 kB view details)

Uploaded Jul 24, 2021 Source

File details

Details for the file playsound-1.3.0.tar.gz.

File metadata

  • Download URL: playsound-1.3.0.tar.gz
  • Upload date: Jul 24, 2021
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.0

File hashes

Hashes for playsound-1.3.0.tar.gz
Algorithm Hash digest
SHA256 cc6ed11d773034b0ef624e6bb4bf50f4b76b8414a59ce6d38afb89b423297ced Copy
MD5 e50e650bf09732c35e20204b57fef9cd Copy
BLAKE2b-256 678cc9f46b4b194126c4abb12e96321a6bea5c8dcc5c0e4d97622c14dfabe299 Copy

See more details on using hashes here.

  • English
  • español
  • français
  • 日本語
  • português (Brasil)
  • українська
  • Ελληνικά
  • Deutsch
  • 中文 (简体)
  • 中文 (繁體)
  • русский
  • עברית
  • Esperanto

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

Từ khóa » Thư Viện Playsound Python