Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



10 Commits

Repository files navigation

PEAR - a tool for sound installations

Take a directory with .wav files named in numeric order and play them over usb sound devices attached to the host computer over and over forever, looping all files once the longest one finishes.

1.wav will play on device 1 etc.

Right now, the project only supports debian-based Linux, and the USB-AUDIO from Plugable, which is based on the C-Media HS 100B. It would be very easy to support more devices, make an issue or just send a PR.


This project is based on the sounddevice python library.

Run the following command to install the prerequisite debian packages:

 sudo apt-get install python3-pip python3-numpy libportaudio2 libsndfile1 screen git

Then install sounddevice and soundfile.

python3 -m pip install sounddevice soundfile


Not a whole lot to do here, just clone the repo

git clone

Run Manually

Run with the command line argument of the folder the sound files are kept in.

All sound files will start playing at the same time, and will restart once the longest one has finished playing.


$ python3 ./test

Run at Boot

If you want pear to start playing sound as soon as it turns on, you can add the included to your crontab.

Edit your crontab with

crontab -e

The resulting file should contain the following line:

@reboot screen -dmS pear /bin/bash /home/pi/pear/

If you want to check in on the script, you can do so any time by running:

screen -r pear

Load sound files automatically from USB drive

In a typically art installation use case, you don't want to have to plug in a keyboard and monitor in order to change the audio files that are playing.

This change allows user to swap sound files using a USB thumb drive or the like.

First, create a mount point for the USB drive.

sudo mkdir /mnt/usb/

Edit your /etc/fstab, adding the following line:

LABEL=PEAR /mnt/usb vfat defaults,auto,umask=000,users,ro,nofail 0 0

Make sure the drive is labeled PEAR or fstab won't pick it up.


a simple tool for sound installations






No releases published


No packages published