Skip to content

antazoey/afplay-py

Repository files navigation

afplay-py

A python wrapper and better CLI for the macOS tool afplay (audio-file player).

Installation

From pip:

pip install afplay-py

From source (from the root project directory):

pip install .

Quick Usage

CLI

Play an audio file using the CLI:

afplay-py ~/path/to/file.mp3

NOTE: The intent is for this CLI to not have some of the problems the regular tool does.

Python

Play an audio file using Python:

from afplay import afplay

afplay("path/to/file.mp3", volume=2, time=100, leaks=True)

Check if afplay is installed:

from afplay import is_installed

print(is_installed())

About

A wrapper around macOS audio-file play command

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages