From 38a8d3ae1c8d9cd4c411f02b83aa66013af61e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Mon, 17 Jul 2017 20:17:17 +0200 Subject: [PATCH] Add README --- README.rst | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 README.rst diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..6a75b97 --- /dev/null +++ b/README.rst @@ -0,0 +1,61 @@ +=============== +WIAI Soundboard +=============== + +Requirements +============ + +- Raspberry Pi +- omxplayer (should be preinstalled on Raspbian) +- Python 3.4 +- youtube-dl +- espeak + +. code:: + + apt install espeak omxplayer python3.4 python3-pip + 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: + +. code:: + + virtualenv py + py/bin/pip install -r requirements.txt + +Apache +------ + +It is also recommended to use Apache instead of the Python Flask web server. + +. code:: + + apt install apache2 libapache2-mod-wsgi-py3 + +Installation +============ + +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 :code:`chmod +rw` 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: + +. code:: + + 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.