Skip to main content

song-and-spell

tl;dr

A key-logger that triggers playing an audio track when a sequence of keys are pressed and a web-app to configure the words and songs.

Requires VLC to be installed on the host and an X server to be running.

install on raspberry-pi 400

With a screen attached

We need to force the X-server to start when the HDMI cable is not plugged in (for the pynput key-logger). The easiest way I found is to run sudo raspi-config, then select Advanced, Screen and pick any screen resolution except for the default one.

Pair, trust and connect your bluetooth speaker. There are many guides for this, here is one.

To install the app, add a systemd-service so that it starts on start-up and make some other changes so that it can headlessly connect to a bluetooth speaker, download and install the install script on your raspberry-pi 400. In a terminal:

Note: this script will only work on a raspberry-pi (or any debian-derived OS with a bluetooth transciever and a normal user pi that is in the audio and bluetooth groups).

curl -L https://raw.githubusercontent.com/cboddy/song-and-spell/master/scripts/install_rpi.sh | sudo bash

Note: this will restart your raspberry-pi. Turn on your speaker and it should automatically connect and go to the web-ui running on port 5000. It should look like the image below.

web-ui

todo

  • volume-normalisation?

notes

  • the pynput library requires an X server to be running. Set default resolution in raspi-config (anything other than default) to force the X server to start.

development

python3 -m venv
. bin/venv/activate
python3 setup.py develop

Release files for song-and-spell 0.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for song-and-spell 0.20.0
File Interpreter ABI Platform
song_and_spell-0.20.0-py3-none-any.whl Python 3 none any Details

Release files / song_and_spell-0.20.0-py3-none-any.whl

Download URL song_and_spell-0.20.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c4f92f8d9d171cb50eeed3efea25e3d990d1efc51f3ee9f53a3006e20653d17
BLAKE2b-256 checksum
How to use checksums
53b6661ef8f85adb68a6b39bb845bab26af02787131a5ebd6dec2be01a613449
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/2.7.17

Release history Release notifications | RSS feed

This release

0.20.0 This release

1 release file

0.18.0

1 release file

0.17.0

1 release file

0.16.0

1 release file

0.15.0

1 release file

0.14.0

1 release file

0.13.0

1 release file

0.12.0

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.5.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page