playsound
Pure Python, cross platform, single function module with no dependencies for playing sounds.
What it is and what it does
Playsound is a minimal, zero-dependency Python wrapper around native platform audio APIs for playing sound files and URLs. It exposes a single function that accepts a file path or URL and an optional blocking flag, delegating to Windows multimedia APIs on Windows, AppKit on macOS, and GStreamer on Linux. The module is intentionally simple—it does one thing and avoids pulling in heavy audio frameworks.
The package is useful when you need basic audio playback in a script or application without adding framework dependencies. It handles MP3 and WAV reliably across platforms; other formats depend on what the underlying system can play. Because it relies on system libraries rather than bundled codecs, installation requires platform-specific setup (particularly on Linux), which is the main friction point. The project is stable and production-ready but dormant since its latest release.
Use it for:
- Play notification or alert sounds in a CLI tool or background service without heavy dependencies.
- Add audio feedback to a Python game or interactive application on Windows, macOS, or Linux.
- Stream and play audio from a URL in a simple script or automation task.
- Test audio playback in a cross-platform application during development or CI/CD.
- Trigger sound effects in a data processing or monitoring script.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Plays audio files (MP3, WAV) and URLs from Python with a single function call, with no external Python dependencies and cross-platform support via native OS audio APIs.
Yes, if you need simple audio playback and can tolerate platform-specific system library setup. The zero-dependency design and cross-platform support make it ideal for lightweight scripts and tools. No, if you need active maintenance, support for exotic audio formats, or advanced playback control—consider a more actively maintained alternative in that case. The dormant status is not a blocker for stable use, but means no fixes for edge cases or new platform support.
Install
playsound on PyPI
pip
pip install playsounduv
uv add playsoundpoetry
poetry add playsoundInstalling playsound
Before you install
High install friction: the package itself has no Python dependencies, but relies on platform-specific system libraries (Windows multimedia, macOS AppKit, Linux GStreamer). Maintenance is dormant—last release was 2021-07-24, though the repository remains active with recent commits and no known vulnerabilities.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution in your own projects.
Quickstart
pip install playsound
from playsound import playsound
playsound('/path/to/sound.mp3')
# or asynchronously:
playsound('/path/to/sound.mp3', block=False)
Requires platform-specific system audio libraries: Windows multimedia (built-in), macOS AppKit (built-in), or Linux GStreamer (must be installed separately on most distributions).
Verify before relying
- Whether GStreamer installation is straightforward on modern Linux distributions beyond Ubuntu 14 and ElementaryOS Loki.
- Current compatibility with Python versions beyond 3.9, given the dormant maintenance status since 2021.
- Whether URL playback works reliably across all platforms and file formats.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 1,847 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 116,831/month — #12,193 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: playsound-1.3.0.tar.gz
Keywords: sound, playsound, music, wave, wav, mp3, media, song, play, audio
Tags
More Players packages
Server-side SDK for generating OpenTok…
permissive · top 5,000 on PyPI
miniaudioMiniaudio provides Python bindings for…
permissive · top 15,000 on PyPI
KivyKivy is a Python framework for building…
permissive · top 15,000 on PyPI
socoSoCo is a Python library for programmatic…
permissive · top 15,000 on PyPI
SoundCardSoundCard plays and records audio across Linux,…
permissive · top 15,000 on PyPI
python-mpvPython ctypes-based interface to the mpv media…
copyleft · top 15,000 on PyPI
sonos-websocketAsync Python library for communicating with…
permissive · top 15,000 on PyPI
pyfmodexPyfmodex provides Python bindings to the FMOD…
permissive · top 15,000 on PyPI
PyAudioPyAudio provides Python bindings for PortAudio…
permissive · top 5,000 on PyPI
audiofileReads and writes audio files across formats…
permissive · top 15,000 on PyPI
audioreadDecode audio files using whichever backend is…
permissive · top 5,000 on PyPI
pydubPydub provides a high-level Python interface…
permissive · top 5,000 on PyPI
fmod-toolkitExtracts and exports audio from FMOD sound bank…
permissive · top 15,000 on PyPI