README.md 3.34 KB
Newer Older
1

David Trattnig's avatar
David Trattnig committed
2
3
# AURA Engine

David Trattnig's avatar
David Trattnig committed
4
<img src="https://gitlab.servus.at/autoradio/meta/-/raw/master/images/aura-logo.png" width="250" align="right" />
David Trattnig's avatar
David Trattnig committed
5
6
7
8

Aura Engine is a play-out engine as part of Automated Radio (Aura) system,
specifically build for the requirements of community radios.

David Trattnig's avatar
David Trattnig committed
9
10
11
12
13
<!-- TOC -->

- [AURA Engine](#aura-engine)
    - [Features](#features)
    - [Architecture](#architecture)
David Trattnig's avatar
David Trattnig committed
14
    - [Requirements](#requirements)
David Trattnig's avatar
David Trattnig committed
15
16
    - [Installation](#installation)
    - [Start the Engine](#start-the-engine)
David Trattnig's avatar
David Trattnig committed
17
    - [Logging](#logging)
David Trattnig's avatar
David Trattnig committed
18
19
20
    - [Resources](#resources)

<!-- /TOC -->
David Trattnig's avatar
David Trattnig committed
21

22
23
## Features

David Trattnig's avatar
David Trattnig committed
24
25
26
27
28
29
30
- Play audio from multiple sources
- Dynamic switching of sources
- Record output to filesystem
- Stream output to an Icecast Server
- Multichannel Line-out
- Blank Detenction / Silence Detecter
- Auto Pilot a.k.a. Fallback Handling
31

David Trattnig's avatar
David Trattnig committed
32
Read more on the [Engine Features](docs/engine-features.md) page.
33
34
35
36
37
38

## Architecture

AURA Engine as part of the AURA Radio Suite uses an modulear architecture
based on a REST API. All external information is retrieved using JSON data-structures.

David Trattnig's avatar
David Trattnig committed
39
40
To learn more, checkout the [Engine Developer Guide](docs/developer-guide.md) or visit
 the [Aura Meta](https://gitlab.servus.at/autoradio/meta) repository.
41

David Trattnig's avatar
David Trattnig committed
42
## Requirements
43

David Trattnig's avatar
David Trattnig committed
44
45
46
**Hardware Requirements:** This depends on how many audio sources and targets you are
 going to use, but for the most common scenarios any current hardware should be sufficient.
 For the audio devices it is required to use an interface which has supported ALSA drivers.
47

48
49
50
**Operating System:** Any linux system with ALSA, PulseAudio or Jack2 support should work. 
It is tested and coded on Debian Stretch and Ubuntu 18.0 with Python 3.6+.

David Trattnig's avatar
David Trattnig committed
51

David Trattnig's avatar
David Trattnig committed
52
## Installation
53
54

```bash
55
git clone https://gitlab.servus.at/autoradio/engine
56
57
```

David Trattnig's avatar
David Trattnig committed
58
**Install System Packages:**
59

60
61
```bash
sudo apt install \
62
63
64
65
66
67
    git \
    python3 python3-pip \
    redis-server \
    liquidsoap liquidsoap-plugin-icecast \
    mariadb-server libmariadbclient-dev \
    quelcom \
David Trattnig's avatar
David Trattnig committed
68
    liquidsoap-plugin-alsa liquidsoap-plugin-pulseaudio \
69
70
71
    liquidsoap-plugin-all
```

David Trattnig's avatar
David Trattnig committed
72
**Install Python Packages:**
73

Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
74
```bash
75
sudo pip3 install -r requirements.txt
76
77
```

David Trattnig's avatar
David Trattnig committed
78
**Setup Database:**
79

Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
80
```bash
81
82
mysql -u root -p

Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
83
84
85
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';  
Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
86
```
87

David Trattnig's avatar
David Trattnig committed
88
**Configuration:**
89

90
Run
91

92
93
94
```bash
  sh init.sh
```
95

96
97
This creates the folder */var/audio* and copies some default configuration
to */etc/aura/engine.ini*
98

David Trattnig's avatar
David Trattnig committed
99
100
After that, you have to edit the settings in */etc/aura/engine.ini*. Ensure to take
your time to carefully review those settings!
101

David Trattnig's avatar
David Trattnig committed
102
Read more about detailed settings in the [Configuration Guide](docs/configuration-guide.md).
103
104


David Trattnig's avatar
David Trattnig committed
105
## Start the Engine
106
107
108

To start the AuRa Engine execute:

David Trattnig's avatar
David Trattnig committed
109
110
111
112
```bash
  systemctl start aura-lqs
  systemctl start aura-engine  
```
113
114
115

and on system boot run following:

David Trattnig's avatar
David Trattnig committed
116
117
118
119
```bash
  systemctl enable aura-lqs
  systemctl enable aura-engine
```
120
121
122

The first service starts the LiquidSoap Engine, while the latter boots the actual AuRa Engine.

David Trattnig's avatar
David Trattnig committed
123
## Logging
124

David Trattnig's avatar
David Trattnig committed
125
You can access the service logs using one of:
126

David Trattnig's avatar
David Trattnig committed
127
```
128
129
    journalctl -u aura-lqs
    journalctl -u aura-engine
David Trattnig's avatar
David Trattnig committed
130
```
131
132
133
134
135
136
137
138
139



## Resources ##

* **Python**: https://docs.python.org/
* **Redis**: https://redis.io/
* **Liquidsoap**: https://www.liquidsoap.info/doc-1.4.0/
* **Jack Audio**: https://jackaudio.org/