Intent handling with command

I followed all the steps, and make sure to place the exact path. Do you think the code is the problem or where do you think is?

@synesthesiam @romkabouter

When I change the WAV files to one of my local patch, do not play even though my local patch has chmod 777 and chmod + x

I do not know if this problem is related.

Note with WAV I mean:


This folder:

is not known in the docker container.

Please post your log from Rhasspy, your whole log from where the intent is Recognized to the end of the session.
There might be an obvious error in it.

I have the 0.mp3 file with chmod 777 in the “profiles” folder and in “profiles/es

In all WAV I put:

It does not work, then I put:
and then

Nothing works. It only works when I place the originals:


With relation to the logs, I eliminate them (the blue button “CLEAR”), I can talk again, I copy them and send them, it does not matter, right?

Rhasspy only plays wav files, so no luck with mp3.

Correct about the logs, we need more verbose logs. Because there can be an error in it which causes your problem with the intent command

Perfect, I will generate the WAV.

With regard to the commands, you can show me an example that works for you? Please. One simple

The .wav has worked, but, the Handling command does not work.
It does not work: ${RHASSPY_PROFILE_DIR}/

Both have all the permissions.

The command starts with: #!/usr/bin/env python3

So I think the problem is something about the code, you can show me one that works, please? So I replenish it and see if it is that or another.

Again: please post the logs from Rhasspy.
If there is an error, it will be shown there.

Hmm that is a bit strange, maybe it is a setting to active more debug info.
I’ll have to check.

In my log there are a lot more message (about sending bytes to various topics)

Would it be too much to ask you to show me the example that works for you? Please. So I tell you the exact configuration and I rule out that it is a problem in my environment or not. Please.

This works for me (with in my profile directory [1]):

    "handle": {
        "command": {
            "program": "${RHASSPY_PROFILE_DIR}/"
        "system": "command"

[1] This is ~/.config/rhasspy/profiles/en on my machine

I do not use command and intent handler, so I have no example.
The example code you have should run fine.

I give up. Nothing works.

Can you show me what’s in your profile JSON? Did my example not work?

1 Like

I’ll try it out as well with the example and see what works.
You are using docker right?

1 Like

Yes, I am using Docker. The problem is that I think I have everything as you tell me. Because I changed the profile.json manually exactly as you told me, and I also tried when the web configurations make the change (there are no errors in this step, because it is programmed by you in Docker).

Above the python file I put what you told me so that it recognizes that it must be run with Python3 (#!/usr/bin/env python3), it has all the permissions (I made sure of that, all the folders before reaching the final path have 777 permissions), and I also made sure of which path is the correct one because it has the same format as the WAV of the wakeword (this works and is in the same path of the profile_dir… ${RHASSPY_PROFILE_DIR}/).

I am using the Home Assistant addon, so it will be a bit different for me :slight_smile:

Can you make screenshot of your Rhasspy settings? That might help

I have changed a coupe of lines in, my intent is “Locations” and I have added some line to print the chosen reply:

elif intent == "Locations":
    replies = ['Hi!', 'Hello!', 'Hey there!', 'Greetings.']
    reply = random.choice(replies) 

This is the output.

The file is set to ${RHASSPY_PROFILE_DIR}/

This is where the file is:

So if you set it to ${RHASSPY_PROFILE_DIR}/ and put it in you active profile, see what happens.

please also attach the docker logs.: docker logs rhasspy

1 Like

Thanks to that log code I am seeing that it passes behind. I see that if you print the text you indicate, the problem is that it does not play the audio.

I have tried two things, in the first case what I did was to place the direct patch, and in 2nd case place the same as I put on the wakeup.

In the 1st case this comes out:

[DEBUG:2021-04-20 14:47:29,495] rhasspyremote_http_hermes: ['/profiles/es/']
[DEBUG:2021-04-20 14:47:29,503] rhasspywake_raven_hermes: Receiving audio
[DEBUG:2021-04-20 14:47:29,755] rhasspyremote_http_hermes: /home/pi/.config/rhasspy/profiles/es/wake.wav: No such file or directory
[WARNING:2021-04-20 14:47:29,756] rhasspyremote_http_hermes: Output: b'Hey there!\ntest-test-test\n'

cd /home/pi/.config/rhasspy/profiles/es/
deepspeech               profile.json  sentences.ini     supervisord.log  wake.wav

In the 2nd case this comes out:

[DEBUG:2021-04-20 14:42:19,892] rhasspyremote_http_hermes: Traceback (most recent call last):
  File "/profiles/es/", line 16, in <module>
    os.system(f"aplay ${RHASSPY_PROFILE_DIR}/wake.wav")
NameError: name 'RHASSPY_PROFILE_DIR' is not defined
[WARNING:2021-04-20 14:42:19,893] rhasspyremote_http_hermes: Output: b'Hi!\n'
[DEBUG:2021-04-20 14:42:21,450] rhasspy-wake-raven: Exiting refractory period

As I said, thanks to that logs command I can see that if it works (I did not know that command, I’m new in this world, so sorry for not seeing it before).

What does not work is the execution of the commands, I do not know why.