AURA Engine
This piece of Software is part of 'AURA - AUtomated RAdio'.
AURA Engine does:
- requesting the programme from an external Source
- switches the soundserver at the correct time to a given source for a specific show
- records what is broadcasted
- streams to an icecast server
- plays to lineout
Installation
Software
Operating System
Any linux system with ALSA, pulseaudio or Jack2 support should work. It is tested and coded on a debian stretch
Packages
On a debian machine:
sudo apt install \
git \
python3 python3-pip \
redis-server \
liquidsoap liquidsoap-plugin-alsa liquidsoap-plugin-flac liquidsoap-plugin-icecast liquidsoap-plugin-pulseaudio \
mariadb-server libmariadbclient-dev \
quelcom
Python Packages
sudo pip3 install \
Flask Flask-SQLAlchemy \
mysqlclient redis simplejson \
mutagen validators
Grab the code
git clone https://gitlab.servus.at/autoradio/engine
Set up a database
Command line way
mysql -u root -p
CREATE DATABASE aura_engine CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'aura'@'localhost' IDENTIFIED BY 'secure-password';
GRANT ALL PRIVILEGES ON aura_engine.* TO 'aura'@'localhost';
phpmyadmin / adminer way
Log into your phpmyadmin or adminer with correct privileges and create a database and a user for the aura engine.
Files and Folders
- Create the audio folder defined in your aura.ini
mkdir /var/audio
mkdir /etc/aura
cp {where you cloned the repo}/configuration/engine.ini /etc/aura/engine.ini
edit engine.ini to your needs
- Edit settings in aura.ini. Take your time for that.
aura.py
It is the server which is connected to the external programme source (e.g. aura steering and tank), to liquidsoap and is listening for redis pubsub messages. This precious little server is telling liquidsoap what to play and when.
Guru
The commandline tool for interacting with the server. Also provides the communication from Liquidsoap to the python (Command-)Server.
Liquidsoap
The heart of AURA Engine. It uses the built in mixer, to switch between different sources.
Find Help
LiquidSoap Reference: http://savonet.sourceforge.net/doc-svn/reference.html Python3.5 Reference: https://docs.python.org/3.5/
Hardware
Soundcard
AURA Engine ist tested with a ASUS Xonar DGX and a Roland Duo-Capture Ex. Both work well with jack and pulseaudio. For good experience with ALSA, you may need better hardware.
Hard/Soft
When you use ALSA, you will have to play around with ALSA settings. In the folder ./modules/liquidsoap is a scipt called alsa_settings_tester.liq. You can start it with 'liquidsoap -v --debug alsa_settings_tester.liq'. Changing and playing with settings can help you to find correct ALSA settings.
Recordings
You can configure up to five recorders. You find the settings in the main config file engine.ini. You can choose between different output formats.
Streams
You can configure up to five streams. You find the settings in the engine.ini. You can choose between different streaming formats.
If you experience 'hangs' on the stream
- reduce the quality or
- install the realtime kernel with
apt install linux-image-rt-amd64 reboot
- invest in better hardware