Maybe I’m being obsessive here, but on a dedicated low-speed RasPi Zero Rhasspy satellite I don’t see a need for Docker or venv to sandbox applications if there is nothing else running in that machine to protect.
It is possible to run Rhasspy as a service; but there were 3 problems:
- shutdown and reboot operations require us to enter our sudo password at the (now non-existent) terminal. Given that this is a dedicated voice assistant satellite and not connected to the interweb, I can probably put up with authorising the user “pi” to have root privileges.
at end of the file, add
pi ALL = NOPASSWD: ALL
- setup the service, by
sudo nano /etc/systemd/system/rhasspy.service
ExecStart=/bin/bash -lc ‘/usr/bin/rhasspy --profile en 2>&1 | cat’
next tell linux to automatically start the service on reboot
sudo systemctl enable rhasspy
and we can start it now
sudo systemctl daemon-reload
sudo systemctl start rhasspy
- Linux system services handle stdout differently from command line. If we had used “ExecStart=rhasspy --profile en” above, we would have got “spawnerr: unknown error making dispatchers for ‘microphone’: ENXIO” errors. See Sherlock - Offline Voice Assistant project for a description
And, so far, this seems to be working for me.