Convert readme to md

This commit is contained in:
Michael Götz 2019-02-17 22:22:06 +01:00
parent ddcaf27ec5
commit b0c229bc56

101
README.md Normal file
View File

@ -0,0 +1,101 @@
WIAI Soundboard
===============
Requirements
------------
- Raspberry Pi
- omxplayer (should be preinstalled on Raspbian)
- Python 3.4
- youtube-dl
- espeak
``` {.sourceCode .}
apt install espeak omxplayer python3.4 python3-pip python3-dbus sqlite3
pip3 install virtualenv youtube-dl
```
It is highly recommended to install the soundboard and its dependencies
into a virtual environment to keep the system clean. To do so first
create a new virtual environment in the desired folder and install the
remaining Python dependencies via the pip of the virtualenv:
``` {.sourceCode .}
virtualenv --system-site-packages py
py/bin/pip install -r requirements.txt
```
### Apache
It is also recommended to use Apache instead of the Python Flask web
server.
``` {.sourceCode .}
apt install apache2 libapache2-mod-wsgi-py3
```
Installation
------------
To create the initial database for the metadata, following command can
be used together with the schema file:
`sqlite3 metadata.sqlite < schema.sql`{.sourceCode}.
The web server user (e.g. www-data) must be in the audio and video
groups. You can add them via usermod -a -G audio,video www-data.
Also the file /dev/vchiq should be writeable by the web user (e.g.
www-data). A quick & dirty way is to use `chmod +rw`{.sourceCode} on the
file.
For installation of the soundboard simply check out the repository and
see the doplyment chapter on how to deploy it.
Deployment
----------
### Development/Debugging
For development and debugging the internal web server of Flask can be
used e.g. by running following command inside the project folder:
``` {.sourceCode .}
FLASK_DEBUG=1 FLASK_APP=soundboard.py py/bin/flask run --host=0.0.0.0
```
### Production
For production deployment Apache (or other webservers like nginx,
lighttpd etc.) should be used.
For Apache a sample configuration is provided in the folder apache which
can be adapted.
Please keep in mind that you may have to adjust the path to the sound
files in your apache config in order to enable local playback on the
clients.
Usage
-----
Users can browse the webinterface, search for sounds and play them on
the remote server or their local browser.
Additionally to the normal point and click usage there are also several
keyboard shortcuts available.
### Keyboard shortcuts
- Navigation items, input fields and sound buttons can be selected by
using tab and shift+tab
- esc clears the search field
- enter plays the selected sound
- ctrl+k and ctrl+c kill all sounds
- ctrl+x switches between local and remote playback
- ctrl+enter kills sounds before the selected gets played
Live version
------------
A list of sound requests and already added sounds can be found here:
<https://pad.wiai.de/p/soundboardTodos>