Rhasspy as service with Debian installation

Thanks @UnderpantsGnome, this needs to be added back to the docs.

Thanks
This configuration in systemd worked.

[Unit]
Description=Rhasspy
After=syslog.target network.target

[Service]
Type=simple
ExecStart=/usr/bin/rhasspy -p de
User=root
Group=root
UMask=0002

RestartSec=1
Restart=on-failure

StandardOutput=syslog
StandardError=syslog

SyslogIdentifier=rhasspy

[Install]
WantedBy=multi-user.target
1 Like

Hello,

i want also run rhasspy as a service and i have use the conf file from @david1998 but i have a error message : RuntimeError: Failed to connect to MQTT broker
i have not this error when i launch rhasspy manually

Do you run it as root in the console or as normal user? Because the systemd file runs as root and uses the profile from /root/rhasspy.

@david1998
hello, i use normal user , i will copy my profile in root directory.
thank you

@david1998

same issue…
i have copy the .config directory in /root directory

when i see systemctl status rhasspy

rhasspy.service - Rhasspy
Loaded: loaded (/etc/systemd/system/rhasspy.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-08-18 09:35:19 CEST; 5min ago
Main PID: 819 (bash)
Memory: 8.7M
CGroup: /system.slice/rhasspy.service
├─819 bash /usr/bin/rhasspy -p fr
└─993 /usr/bin/python2 /usr/bin/supervisord --configuration /root/.config/rhasspy/profiles/fr/supervisord.conf --logfile /root/.config/rhasspy/profiles/fr/supervisord.log --pidfile /root/.config/rhasspy/profiles/fr/supervisord.pid

août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “main.py”, line 4, in
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “rhasspy/main.py”, line 57, in main
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “”, line 983, in _find_and_load
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “”, line 967, in _find_and_load_unlocked
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “”, line 677, in _load_unlocked
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “/usr/lib/rhasspy/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py”, line 623, in exec_module
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 2588, in
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 231, in start_rhasspy
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 296, in start
août 18 09:36:10 raspberrypi-sat rhasspy[819]: RuntimeError: Failed to connect to MQTT broker

here the message in log file:

août 18 09:36:09 raspberrypi-sat rhasspy[819]: ConnectionRefusedError: [Errno 111] Connection refused
août 18 09:36:10 raspberrypi-sat rhasspy[819]: [CRITICAL:2020-08-18 09:36:10,416] rhasspyserver_hermes: Failed to connect to MQTT broker (localhost:12183)
août 18 09:36:10 raspberrypi-sat rhasspy[819]: [994] Failed to execute script main
août 18 09:36:10 raspberrypi-sat rhasspy[819]: Traceback (most recent call last):
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “main.py”, line 4, in
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “rhasspy/main.py”, line 57, in main
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “”, line 983, in _find_and_load
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “”, line 967, in _find_and_load_unlocked
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “”, line 677, in _load_unlocked
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “/usr/lib/rhasspy/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py”, line 623, in exec_module
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 2588, in
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 231, in start_rhasspy
août 18 09:36:10 raspberrypi-sat rhasspy[819]: File “rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 296, in start
août 18 09:36:10 raspberrypi-sat rhasspy[819]: RuntimeError: Failed to connect to MQTT broker

I had the same problem… Starting rhasspy as normal user and doing some extra steps fixed it. First edit the service file, and change user=root to user=yourusername Then try if it already works.
For me it doesn’t, so I’ve stopped the rhasspy service and the mosquitto broker as well. Then startet the broker manually with port 12183 as listener.
For this create a file default.conf in /etc/mosquitto/conf.d and add the line

listener 12183

then start the broker.
Edit the lines for the MQTT connection in your profile.json file, that rhasspy will connect to a external broker at localhost.

“mqtt”: {
“enabled”: “true”,
“host”: “127.0.0.1”,
“port”: “12183”,
“site_id”: “base”

Then restart the service.
Maybe you have to give some permissions for your folder, that supervisord works.
So type

sudo chmod 777 -R /path/to/rhasspy/profiles/yourProfile

If you now get some strange errors from supervisord, edit your service file like this.

[Unit]
Description=Rhasspy
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/bin/bash -o pipefail -c ‘{ /usr/bin/rhasspy -p de 2>&1 | cat >&2 3>&-; } 3>&1’
User=orangepi
Group=root
RestartSec=1
Restart=on-failure
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rhasspy
[Install]
WantedBy=multi-user.target

hello, thank you

in my case it’s for a satellite, not for the server,

mosquitto broker is not only for the server?

Did you config the broker as external broker in your profile?

on the satellite? no internal as the example in the documentation:

https://rhasspy.readthedocs.io/en/latest/tutorials/#http-example

Then try the steps I’ve listed above. First try executing the service as normal user.

i have build an external mqtt server and now that seem to work.
i will test and i tell you

short-lived happiness, service start, web interface work but wake word and audio recording not work.
i continue to investigate

can you post the logs?

@david1998

août 18 17:51:53 raspberrypi-sat systemd[1]: Started Rhasspy.
août 18 17:51:57 raspberrypi-sat rhasspy[514]: Starting up…
août 18 17:52:08 raspberrypi-sat rhasspy[514]: DEBUG:rhasspysupervisor:Namespace(debug=True, docker_compose=’’, local_mqtt_port=12183, profile=‘fr’, supervisord_conf=‘supervisord.conf’, system_profiles=None, user_profiles=PosixPath(’/root/.config/rhasspy/profiles’))
août 18 17:52:08 raspberrypi-sat rhasspy[514]: DEBUG:rhasspysupervisor:Loading profile fr (user=/root/.config/rhasspy/profiles, system=None)
août 18 17:52:08 raspberrypi-sat rhasspy[514]: DEBUG:rhasspyprofile.profile:Loading /usr/lib/rhasspy/rhasspy/rhasspyprofile/profiles/fr/profile.json
août 18 17:52:08 raspberrypi-sat rhasspy[514]: DEBUG:rhasspyprofile.profile:Loading /root/.config/rhasspy/profiles/fr/profile.json
août 18 17:52:08 raspberrypi-sat rhasspy[514]: DEBUG:rhasspysupervisor:Generating supervisord conf
août 18 17:52:08 raspberrypi-sat rhasspy[514]: WARNING:rhasspysupervisor:No speech to text training URL was provided
août 18 17:52:08 raspberrypi-sat rhasspy[514]: WARNING:rhasspysupervisor:No intent training URL was provided
août 18 17:52:08 raspberrypi-sat rhasspy[514]: DEBUG:rhasspysupervisor:Wrote /root/.config/rhasspy/profiles/fr/supervisord.conf
août 18 17:52:08 raspberrypi-sat rhasspy[514]: Starting services…
août 18 17:52:26 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:26,650 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
août 18 17:52:26 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:26,702 INFO supervisord started with pid 671
août 18 17:52:27 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:27,740 INFO spawnerr: unknown error making dispatchers for ‘dialogue’: ENXIO
août 18 17:52:27 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:27,776 INFO spawnerr: unknown error making dispatchers for ‘speech_to_text’: ENXIO
août 18 17:52:27 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:27,785 INFO spawnerr: unknown error making dispatchers for ‘speakers’: ENXIO
août 18 17:52:27 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:27,807 INFO spawnerr: unknown error making dispatchers for ‘wake_word’: ENXIO
août 18 17:52:27 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:27,826 INFO spawnerr: unknown error making dispatchers for ‘intent_recognition’: ENXIO
août 18 17:52:27 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:27,844 INFO spawnerr: unknown error making dispatchers for ‘webhooks’: ENXIO
août 18 17:52:27 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:27,855 INFO spawnerr: unknown error making dispatchers for ‘intent_handling’: ENXIO
août 18 17:52:27 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:27,872 INFO spawnerr: unknown error making dispatchers for ‘text_to_speech’: ENXIO
août 18 17:52:27 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:27,907 INFO spawnerr: unknown error making dispatchers for ‘microphone’: ENXIO
août 18 17:52:28 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:28,932 INFO spawnerr: unknown error making dispatchers for ‘dialogue’: ENXIO
août 18 17:52:28 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:28,953 INFO spawnerr: unknown error making dispatchers for ‘speech_to_text’: ENXIO
août 18 17:52:28 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:28,973 INFO spawnerr: unknown error making dispatchers for ‘speakers’: ENXIO
août 18 17:52:28 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:28,992 INFO spawnerr: unknown error making dispatchers for ‘wake_word’: ENXIO
août 18 17:52:29 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:29,009 INFO spawnerr: unknown error making dispatchers for ‘intent_recognition’: ENXIO
août 18 17:52:29 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:29,030 INFO spawnerr: unknown error making dispatchers for ‘webhooks’: ENXIO
août 18 17:52:29 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:29,050 INFO spawnerr: unknown error making dispatchers for ‘intent_handling’: ENXIO
août 18 17:52:29 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:29,061 INFO spawnerr: unknown error making dispatchers for ‘text_to_speech’: ENXIO
août 18 17:52:29 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:29,083 INFO spawnerr: unknown error making dispatchers for ‘microphone’: ENXIO
août 18 17:52:31 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:31,104 INFO spawnerr: unknown error making dispatchers for ‘dialogue’: ENXIO
août 18 17:52:31 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:31,139 INFO spawnerr: unknown error making dispatchers for ‘speech_to_text’: ENXIO
août 18 17:52:31 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:31,154 INFO spawnerr: unknown error making dispatchers for ‘speakers’: ENXIO
août 18 17:52:31 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:31,181 INFO spawnerr: unknown error making dispatchers for ‘wake_word’: ENXIO
août 18 17:52:31 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:31,194 INFO spawnerr: unknown error making dispatchers for ‘intent_recognition’: ENXIO
août 18 17:52:31 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:31,212 INFO spawnerr: unknown error making dispatchers for ‘webhooks’: ENXIO
août 18 17:52:31 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:31,231 INFO spawnerr: unknown error making dispatchers for ‘intent_handling’: ENXIO
août 18 17:52:31 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:31,248 INFO spawnerr: unknown error making dispatchers for ‘text_to_speech’: ENXIO
août 18 17:52:31 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:31,277 INFO spawnerr: unknown error making dispatchers for ‘microphone’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,309 INFO spawnerr: unknown error making dispatchers for ‘dialogue’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,314 INFO gave up: dialogue entered FATAL state, too many start retries too quickly
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,336 INFO spawnerr: unknown error making dispatchers for ‘speech_to_text’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,349 INFO gave up: speech_to_text entered FATAL state, too many start retries too quickly
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,366 INFO spawnerr: unknown error making dispatchers for ‘speakers’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,369 INFO gave up: speakers entered FATAL state, too many start retries too quickly
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,380 INFO spawnerr: unknown error making dispatchers for ‘wake_word’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,387 INFO gave up: wake_word entered FATAL state, too many start retries too quickly
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,403 INFO spawnerr: unknown error making dispatchers for ‘intent_recognition’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,417 INFO gave up: intent_recognition entered FATAL state, too many start retries too quickly
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,428 INFO spawnerr: unknown error making dispatchers for ‘webhooks’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,437 INFO gave up: webhooks entered FATAL state, too many start retries too quickly
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,457 INFO spawnerr: unknown error making dispatchers for ‘intent_handling’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,460 INFO gave up: intent_handling entered FATAL state, too many start retries too quickly
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,469 INFO spawnerr: unknown error making dispatchers for ‘text_to_speech’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,477 INFO gave up: text_to_speech entered FATAL state, too many start retries too quickly
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,500 INFO spawnerr: unknown error making dispatchers for ‘microphone’: ENXIO
août 18 17:52:34 raspberrypi-sat rhasspy[514]: 2020-08-18 17:52:34,506 INFO gave up: microphone entered FATAL state, too many start retries too quickly
août 18 17:52:47 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:47,928] rhasspyserver_hermes: Namespace(certfile=None, host=‘0.0.0.0’, keyfile=None, local_mqtt_port=12183, log_format=’[%(levelname)s:%(asctime)s] %(name)s: %(message)s’, log_level=‘DEBUG’, mqtt_host=None, mqtt_password=None, mqtt_port=None, mqt
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,675] rhasspyprofile.profile: Loading /usr/lib/rhasspy/rhasspy/rhasspyprofile/profiles/fr/profile.json
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,695] rhasspyprofile.profile: Loading /root/.config/rhasspy/profiles/fr/profile.json
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,709] rhasspyprofile.profile: Loading default profile settings from /usr/lib/rhasspy/rhasspy/rhasspyprofile/profiles/defaults.json
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,742] rhasspyserver_hermes: Starting core
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,746] rhasspyserver_hermes: Connecting to 10.28.201.156:1883 (retries: 0/10)
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,787] rhasspyserver_hermes: Connected to MQTT broker
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,793] rhasspyserver_hermes: Subscribed to hermes/hotword/+/detected
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,799] rhasspyserver_hermes: Subscribed to hermes/asr/textCaptured
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,805] rhasspyserver_hermes: Subscribed to hermes/intent/#
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,810] rhasspyserver_hermes: Subscribed to hermes/nlu/intentNotRecognized
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,817] rhasspyserver_hermes: Subscribed to rhasspy/asr/Satellite/Satellite/audioCaptured
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,823] rhasspyserver_hermes: Subscribed to hermes/audioServer/Satellite/audioSummary
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,828] rhasspyserver_hermes: Subscribed to hermes/hotword/+/detected
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,833] rhasspyserver_hermes: Subscribed to hermes/intent/#
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,839] rhasspyserver_hermes: Subscribed to hermes/nlu/intentNotRecognized
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,844] rhasspyserver_hermes: Subscribed to hermes/audioServer/Satellite/audioSummary
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,850] rhasspyserver_hermes: Subscribed to hermes/asr/textCaptured
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,855] rhasspyserver_hermes: Subscribed to rhasspy/asr/Satellite/Satellite/audioCaptured
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [INFO:2020-08-18 17:52:49,860] rhasspyserver_hermes: Started
août 18 17:52:49 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:52:49,865] rhasspyserver_hermes: Starting web server at http://0.0.0.0:12101
août 18 17:52:49 raspberrypi-sat rhasspy[514]: Running on 0.0.0.0:12101 over http (CTRL + C to quit)
août 18 17:53:47 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:53:47,742] rhasspyserver_hermes: -> HandleToggleOff(site_id=‘Satellite’)
août 18 17:53:47 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:53:47,758] rhasspyserver_hermes: Publishing 23 bytes(s) to rhasspy/handle/toggleOff
août 18 17:53:47 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:53:47,778] rhasspyserver_hermes: Subscribed to hermes/error/nlu
août 18 17:53:47 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:53:47,800] rhasspyserver_hermes: -> NluQuery(input=‘quelle heure est-il’, site_id=‘Satellite’, id=‘27061d01-711d-400b-80ce-a6a48553e313’, intent_filter=None, session_id=‘27061d01-711d-400b-80ce-a6a48553e313’, wakeword_id=None, lang=None)
août 18 17:53:47 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:53:47,809] rhasspyserver_hermes: Publishing 210 bytes(s) to hermes/nlu/query
août 18 17:54:17 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:54:17,859] rhasspyserver_hermes: -> HandleToggleOn(site_id=‘Satellite’)
août 18 17:54:17 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:54:17,874] rhasspyserver_hermes: Publishing 23 bytes(s) to rhasspy/handle/toggleOn
août 18 17:54:17 raspberrypi-sat rhasspy[514]: [ERROR:2020-08-18 17:54:17,889] rhasspyserver_hermes:
août 18 17:54:17 raspberrypi-sat rhasspy[514]: Traceback (most recent call last):
août 18 17:54:17 raspberrypi-sat rhasspy[514]: File “quart/app.py”, line 1821, in full_dispatch_request
août 18 17:54:17 raspberrypi-sat rhasspy[514]: File “quart/app.py”, line 1869, in dispatch_request
août 18 17:54:17 raspberrypi-sat rhasspy[514]: File “rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1369, in api_text_to_intent
août 18 17:54:17 raspberrypi-sat rhasspy[514]: File “rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 2551, in text_to_intent_dict
août 18 17:54:17 raspberrypi-sat rhasspy[514]: File “rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 513, in recognize_intent
août 18 17:54:17 raspberrypi-sat rhasspy[514]: File “rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in publish_wait
août 18 17:54:17 raspberrypi-sat rhasspy[514]: File “asyncio/tasks.py”, line 449, in wait_for
août 18 17:54:17 raspberrypi-sat rhasspy[514]: concurrent.futures._base.TimeoutError
août 18 17:55:02 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:55:02,534] rhasspyserver_hermes: Subscribed to hermes/tts/sayFinished
août 18 17:55:02 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:55:02,549] rhasspyserver_hermes: Subscribed to hermes/error/tts
août 18 17:55:02 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:55:02,559] rhasspyserver_hermes: Subscribed to hermes/audioServer/Satellite/playBytes/#
août 18 17:55:02 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:55:02,569] rhasspyserver_hermes: Subscribed to hermes/error/audioServer/play
août 18 17:55:02 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:55:02,585] rhasspyserver_hermes: -> TtsSay(text=‘bonjour je sais parler’, site_id=‘Satellite’, lang=None, id=‘fac28ca0-1134-41aa-b6a1-a29e1ed3b721’, session_id=’’)
août 18 17:55:02 raspberrypi-sat rhasspy[514]: [DEBUG:2020-08-18 17:55:02,595] rhasspyserver_hermes: Publishing 134 bytes(s) to hermes/tts/say
août 18 17:55:32 raspberrypi-sat rhasspy[514]: [ERROR:2020-08-18 17:55:32,640] rhasspyserver_hermes:
août 18 17:55:32 raspberrypi-sat rhasspy[514]: Traceback (most recent call last):
août 18 17:55:32 raspberrypi-sat rhasspy[514]: File “quart/app.py”, line 1821, in full_dispatch_request
août 18 17:55:32 raspberrypi-sat rhasspy[514]: File “quart/app.py”, line 1869, in dispatch_request
août 18 17:55:32 raspberrypi-sat rhasspy[514]: File “rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1612, in api_text_to_speech
août 18 17:55:32 raspberrypi-sat rhasspy[514]: File “rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1598, in speak
août 18 17:55:32 raspberrypi-sat rhasspy[514]: File “rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 587, in speak_sentence
août 18 17:55:32 raspberrypi-sat rhasspy[514]: File “rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in publish_wait
août 18 17:55:32 raspberrypi-sat rhasspy[514]: File “asyncio/tasks.py”, line 449, in wait_for
août 18 17:55:32 raspberrypi-sat rhasspy[514]: concurrent.futures._base.TimeoutError

Use

sudo chmod 777 -R /path/to/rhasspyprofile

to solve the missing permissions.

already done:

pi@raspberrypi-sat:~ $ sudo ls -alsh /root/.config/rhasspy
total 12K
4,0K drwxrwxrwx 3 root root 4,0K août 18 13:47 .
4,0K drwxrwxr-x 3 root root 4,0K août 18 13:47 …
4,0K drwxrwxrwx 3 root root 4,0K août 18 13:47 profiles
pi@raspberrypi-sat:~ $ sudo ls -alsh /root/.config/rhasspy/profiles
total 12K
4,0K drwxrwxrwx 3 root root 4,0K août 18 13:47 .
4,0K drwxrwxrwx 3 root root 4,0K août 18 13:47 …
4,0K drwxrwxrwx 5 root root 4,0K août 18 17:52 fr
pi@raspberrypi-sat:~ $ sudo ls -alsh /root/.config/rhasspy/profiles/fr
total 528K
4,0K drwxrwxrwx 5 root root 4,0K août 18 17:52 .
4,0K drwxrwxrwx 3 root root 4,0K août 18 13:47 …
4,0K -rwxrwxrwx 1 root root 2,9K août 18 14:08 docker-compose.yml
4,0K -rwxrwxrwx 1 root root 1,9K août 18 13:47 intent_graph.pickle.gz
4,0K -rwxrwxrwx 1 root root 1,6K août 18 14:08 profile.json
4,0K drwxrwxrwx 4 root root 4,0K août 18 13:47 raven
4,0K drwxrwxrwx 2 root root 4,0K août 18 13:47 slots
4,0K drwxrwxrwx 2 root root 4,0K août 18 13:47 snowboy
4,0K -rwxrwxrwx 1 root root 3,2K août 18 17:52 supervisord.conf
488K -rwxrwxrwx 1 root root 485K août 18 17:52 supervisord.log
4,0K -rw-rw-r-- 1 root root 4 août 18 17:52 supervisord.pid
pi@raspberrypi-sat:~ $

edit:
i use chmode on /root/.config/rhasspy

uneless it,is on : /usr/lib/rhasspy/rhasspy/rhasspyprofile/profiles/

but the right seem good

pi@raspberrypi-sat:~ $ sudo ls -alsh /usr/lib/rhasspy/rhasspy/rhasspyprofile/profiles
total 76K
4,0K drwxrwxr-x 16 root root 4,0K août 10 21:57 .
4,0K drwxr-xr-x 3 root root 4,0K août 10 21:56 …
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 ca
4,0K drwxrwxr-x 5 root root 4,0K août 10 21:57 de
12K -rwxrwxr-x 1 root root 9,4K août 4 21:56 defaults.json
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 el
4,0K drwxrwxr-x 5 root root 4,0K août 10 21:57 en
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 es
4,0K drwxrwxr-x 6 root root 4,0K août 16 12:28 fr
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 hi
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 it
4,0K drwxrwxr-x 5 root root 4,0K août 10 21:57 nl
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 pt
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 ru
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 sv
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 vi
4,0K drwxrwxr-x 4 root root 4,0K août 10 21:57 zh

Hello @jericho63,

Did you solve your issue with the error? I have the same issue with 2.5.6.

Regards,

Richard

Hello,

no i use docker now

I ran into the same problem trying to run rhasspy as a service on my Raspberry Pi Zero.

I finally managed to get a proper configuration thanks to this thread which led me to this github issue with the solution.

Here is my file /lib/systemd/system/rhasspy.service

[Unit]
Description=Rhasspy Service
After=syslog.target network.target

[Service]
Type=simple
ExecStart=/bin/bash -c '/usr/bin/rhasspy --profile fr 2>&1 | cat'
RestartSec=1
Restart=on-failure
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rhasspy

[Install]
WantedBy=multi-user.target

And while I’m there, here is a tutorial explaining how to use systemd to create a service.
Another problem I encountered is that I did not install mosquitto, but that is covered in the official documentation.

3 Likes