Skip to main content

Wrappers for the libcanberra sound-playing interface

Project description

https://badge.fury.io/py/py-canberra.svg Documentation Status

py-canberra is a Python interface to the libcanberra sound-playing library for Linux.

Full documentation is available here

Dependencies

The only dependency is libcanberra, which can usually be installed from your package repository as libcanberra.

# Ubuntu
apt install libcanberra0

# RHEL / CentOS
yum install libcanberra

# Arch
pacman -S libcanberra

Installation

py-canberra includes binary distributions for many platforms through PyPI

pip install py-canberra

Quickstart

Oftentimes, if libcanberra is installed, some default system sounds will be installed to /usr/share/sounds, including a bell sound

import canberra
canberra.play(event_id='bell')

import time
time.sleep(0.5)  # wait for the sound to finish playing

This plays /usr/share/sounds/freedesktop/stereo/bell.oga on the default output device.

Project details


Download files

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

Source Distribution

py-canberra-0.0.4.tar.gz (75.0 kB view hashes)

Uploaded Source

Built Distributions

py_canberra-0.0.4-cp38-cp38-manylinux2014_x86_64.whl (249.2 kB view hashes)

Uploaded CPython 3.8

py_canberra-0.0.4-cp38-cp38-manylinux2014_i686.whl (241.1 kB view hashes)

Uploaded CPython 3.8

py_canberra-0.0.4-cp38-cp38-manylinux1_i686.whl (241.1 kB view hashes)

Uploaded CPython 3.8

py_canberra-0.0.4-cp37-cp37m-manylinux2014_x86_64.whl (214.4 kB view hashes)

Uploaded CPython 3.7m

py_canberra-0.0.4-cp37-cp37m-manylinux2014_i686.whl (206.6 kB view hashes)

Uploaded CPython 3.7m

py_canberra-0.0.4-cp37-cp37m-manylinux1_i686.whl (206.6 kB view hashes)

Uploaded CPython 3.7m

py_canberra-0.0.4-cp36-cp36m-manylinux2014_x86_64.whl (213.7 kB view hashes)

Uploaded CPython 3.6m

py_canberra-0.0.4-cp36-cp36m-manylinux2014_i686.whl (206.1 kB view hashes)

Uploaded CPython 3.6m

py_canberra-0.0.4-cp36-cp36m-manylinux1_i686.whl (206.1 kB view hashes)

Uploaded CPython 3.6m

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