An open source implementation of the audio server part of the Hermes protocol
Project description
Hermes Audio Server
Hermes Audio server implements the audio server part of the Hermes protocol defined by Snips.
It's meant to be used with Rhasspy, an offline, multilingual voice assistant toolkit that works with Home Assistant and is completely open source.
With Hermes Audio Server, you can use the microphone and speaker of your computer (such as a Raspberry Pi) as remote audio input and output for a Rhasspy system.
System requirements
Hermes Audio Server requires Python 3. It has been tested on a Raspberry Pi running Raspbian 9.8, but in principle it should be cross-platform. Please open an issue on GitHub when you encounter problems on your platform.
Installation
You can install the dependencies like this:
sudo apt install portaudio19-dev
pip3 install -r requirements.txt
There's currently no installation script for Hermes Audio Server yet. This will be added in the next version.
Configuration
Hermes Audio Server is configured in the JSON file /etc/hermes-audio-server.json
, which has the following format:
{
"site": "default",
"mqtt": {
"host": "localhost",
"port": 1883,
"authentication": {
"username": "foobar",
"password": "secretpassword"
},
"tls": {
"ca_certificates": "",
"client_certificate": "",
"client_key": ""
}
}
}
All keys are optional. The default behaviour is to connect with localhost:1883
without authentication and TLS and to use default
as the site ID.
Currently Hermes Audio Server uses the system's default microphone and speaker. In the next version this will be configurable.
Running Hermes Audio Server
Hermes Audio Server consists of two commands: Hermes Audio Player that receives WAV files on MQTT and plays them on the speaker, and Hermes Audio Recorder that records WAV files from the microphone and sends them as audio frames on MQTT.
You can run the Hermes Audio Player like this:
python3 src/hermes_audio_server/hermes_audio_player.py
You can run the Hermes Audio Recorder like this:
python3 src/hermes_audio_server/hermes_audio_recorder.py
You can run both, or only one of them if you only want to use the speaker or microphone.
Usage
Both commands know the --help
option that gives you more information about the recognized options. For instance:
usage: hermes_audio_player.py [-h] [-v] [-V] [-c CONFIG]
hermes-audio-player is an audio server implementing the playback part of
the Hermes protocol.
optional arguments:
-h, --help show this help message and exit
-v, --verbose use verbose output
-V, --version print version information and exit
-c CONFIG, --config CONFIG
configuration file [default: /etc/hermes-audio-
server.json]
TODO list
The following features will be developed soon:
- Create an installer
- Add logging
- Make it possible to run the commands as daemons (and add systemd unit files)
- Add an option to let the user choose the audio devices
- Add more documentation
Other interesting projects
If you find Hermes Audio Server interesting, also have a look at the following projects:
- Rhasspy: An offline, multilingual voice assistant toolkit that works with Home Assistant and is completely open source.
- Snips Led Control: An easy way to control the leds of your Snips-compatible device, with led patterns when the hotword is detected, the device is listening, speaking, idle, ...
- Matrix-Voice-ESP32-MQTT-Audio-Streamer: The equivalent of Hermes Audio Server for a Matrix Voice ESP32 board, including LED control and OTA updates.
- OpenSnips: A collection of open source projects related to the Snips voice platform.
License
This project is provided by Koen Vervloesem as open source software with the MIT license. See the LICENSE file for more information.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file hermes-audio-server-0.0.1.tar.gz
.
File metadata
- Download URL: hermes-audio-server-0.0.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2ef3a59a7edacda846290251507a0b2fbc1317648b2cf998809029c54fca577 |
|
MD5 | 8020168fcb44b449110fab7aaa9169d0 |
|
BLAKE2b-256 | 8b85c96280f75896c2d2fe2a7f152981e06a91858f54bbb241ef925dece0466c |
File details
Details for the file hermes_audio_server-0.0.1-py3.7.egg
.
File metadata
- Download URL: hermes_audio_server-0.0.1-py3.7.egg
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a36513be273cb17a67324141e4928f9fdb028afd809ef5a574502ca101adc3b |
|
MD5 | 10cda320018e0738d82f726265c62a05 |
|
BLAKE2b-256 | 253d9886c13827ab37b4618934cf8b10b179be0138e6f7d1dc0bef5a4e7d07d3 |
File details
Details for the file hermes_audio_server-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: hermes_audio_server-0.0.1-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13e109a5c6566cc4fc0556a63929bfbe567491deed35af7c2cd7095c8473222f |
|
MD5 | 1fcd6cbdbb4debb42985e568a6dc2f54 |
|
BLAKE2b-256 | a6b09ea165d2a52c18d402c832b79566248832464a29463aed0384c788aacd0f |