Metadata-Version: 2.1
Name: song-and-spell
Version: 0.18.0
Summary: A configurable, mutable toddler radio that encourages spelling
Home-page: https://github.com/cboddy/song-and-spell
Author: Chris Boddy
Author-email: chris@boddy.im
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: appdirs
Requires-Dist: backcall
Requires-Dist: black
Requires-Dist: click
Requires-Dist: dataclasses
Requires-Dist: decorator
Requires-Dist: evdev
Requires-Dist: Flask
Requires-Dist: ipython
Requires-Dist: ipython-genutils
Requires-Dist: itsdangerous
Requires-Dist: jedi
Requires-Dist: Jinja2
Requires-Dist: MarkupSafe
Requires-Dist: mypy-extensions
Requires-Dist: parso
Requires-Dist: pathspec
Requires-Dist: pexpect
Requires-Dist: pickleshare
Requires-Dist: prompt-toolkit
Requires-Dist: ptyprocess
Requires-Dist: Pygments
Requires-Dist: pynput
Requires-Dist: python-xlib
Requires-Dist: regex
Requires-Dist: six
Requires-Dist: toml
Requires-Dist: traitlets
Requires-Dist: typed-ast
Requires-Dist: typing-extensions
Requires-Dist: wcwidth
Requires-Dist: Werkzeug
Requires-Dist: wheel
Requires-Dist: xdg
Requires-Dist: youtube-dl

# 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](https://raspberrydiy.com/connect-raspberry-pi-bluetooth-speaker/).

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](/scripts/install_rpi.sh) 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
![](https://github.com/cboddy/song-and-spell/blob/master/images/song_and_spell_webui.png)

### 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
```


