it’s alive ! But seems that something has changed with rhasspy-client :
python3 intentDispatcher.py
Got unhandled command:
Let me check. It is 5 45.
Task exception was never retrieved
future: <Task finished coro=<speak() done, defined at intentDispatcher.py:13> exception=AttributeError("'RhasspyClient' object has no attribute 'text_to_speech'")>
Traceback (most recent call last):
File "intentDispatcher.py", line 18, in speak
await client.text_to_speech(text)
AttributeError: 'RhasspyClient' object has no attribute 'text_to_speech'
Yes, it’s working here. I run a deployment with the official docker container. Have you looked at the server logs? The python error is printed there if there is one.
I have the same problem though the script works perfectly in command line when i feed it with the json found in the logs.
No error triggered in rhasspy logs
I made a couple of tries, command is a great feature but IMHO it is not usable with a complex python script.
Python is easy but as soon as soon you load some dependencies script starting is very slow. As an example on my Pi3B import mplayer.py takes almost 3 seconds which is way to long when you wait for an answer.
@jason solution with a daemon seems better in that usecase
I agree, @duch, I already suggested AppDaemon, which I played with for a simple script. If I would start a more complex intent handler script now, I would use AppDaemon. You can use it with Home Assistant events or MQTT messages.
Unfortunately I don’t have time now to explore this route further, but you should definitely check it out if you want a daemon-based approach.
It seems that the program file in “intent handling -> local command” is found only if it has only one character in the name.
I know that sounds strange but I had it working with a program in “/usr/bin/A” however with the same program in “/usr/bin/handle.py” I get :
FileNotFoundError: [Errno 2] No such file or directory: ‘h’: ‘h’
Did you ever get this working? I’m trying to call a local command in Rhasspy and it doesn’t seem to actually run it. Curious if you had to put the script somewhere specific?