Home

Awesome

rhasspy-watch

Rhasspy-watch is a tool for dynamic display of Rhasspy MQTT messages with recording and query functionalities.

Text messages are saved in json format and audio streaming are saved in .wav format. So you can listen again to what was recorded by the microphone and sent to the ASR !

Alt Text

Installation

To work, the script needs :

Quick and dirty :

pip3 install -r requirements.txt

Get repository :

git clone https://github.com/cedcox/rhasspy-watch
cd rhasspy-watch

Run the script

python3 ./rhasspy-watch.py

Parameters

Examples

Just display live messages in human readable text

python3 ./rhasspy-watch.py --host rhasspy-master.local 

Display live messages in human readable text and record messages

python3 ./rhasspy-watch.py --host rhasspy-master.local  --mode mqtt_db

Display recorded messages in json format between 2 hours

python3 ./rhasspy-watch.py --mode search --datetime_start "2020-04-25 15h30" --datetime_stop "2020-04-25 17h30" --outputFormat "raw"

Docker

Build

git clone https://github.com/cedcox/rhasspy-watch
cd rhasspy-watch
docker build --tag rhasspy-watch .

Run with host, user and password

docker run -e RW_HOST=192.168.99.1 -e RW_USERNAME=mqtt -e RW_PASSWORD=mqtt  rhasspy-watch

Infos

I did not test authentication for MQTT :) I added it just in case someone wants to try

it's just a tool quickly developped to answer to a need, not a real soft

French article about tool : https://www.coxprod.org/domotique/rhasspy-watch/

Warning

The choice to use files instead of database to save the messages was made for reasons of simplicity and speed of writing the script. And secondly, because the tool is only started a few days, long enough to analyze a malfunction. The count of generated files should not be a problem.

However, I do not recommend using it for too long because the number of files may be very large.

Thanks

Thanks to Koen Vervloesem - hermes-audio-server I helped myself with what he had done on this project

License

This project is licensed under the GNU License - see the LICENSE file for details