I have a google aiyproject voice kit. I have setup authentication and everything work when the script is run from terminal, like ./example.py
. I configured the same script as a systemctl service, and when start I get this error.
Feb 26 20:27:47 raspberrypi python3[933]: To use the Assistant API, manually start the application from the dev terminal.
Feb 26 20:27:47 raspberrypi python3[933]: See the "Turn on the Assistant API" section of the Voice Recognizer
Feb 26 20:27:47 raspberrypi python3[933]: User's Guide for more info.
I see this piece of code here
if not os.getenv('DISPLAY') and not sys.stdout.isatty():
print("""
To use the Assistant API, manually start the application from the dev terminal.
See the "Turn on the Assistant API" section of the Voice Recognizer
User's Guide for more info.""")
sys.exit(1)
I am not too familiar with python, and wonder why can't it run as a service. The auth token is saved in a file, and no need to be interactive. Is there a way I can achieve this. My requirement is that on system boot, the assistant program should start automatically in headless mode.