Custom intent recognition with external command


I’m trying to use an external command for the intent recognition, since this let’s me use wildcards in the command. Right now, the rhasspy profile has:

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

and my script is located at: /home/pi/.config/rhasspy/profiles/en/

But, docker logs rhasspy shows:

FileNotFoundError: [Errno 2] No such file or directory: '${RHASSPY_PROFILE_DIR}/': '${RHASSPY_PROFILE_DIR}/'
[DEBUG:2021-08-18 12:55:47,962] rhasspyremote_http_hermes: -> NluError(error='FileNotFoundError(2, "No such file or directory: \'${RHASSPY_PROFILE_DIR}/\'")', site_id='default', context="NluQuery(input='what time is it', site_id='default', id=None, intent_filter=None, session_id='default-porcupine_raspberry-pi-c74dddb5-30bb-469a-9693-cea258a92ddc', wakeword_id='porcupine_raspberry-pi', lang=None, custom_data='porcupine_raspberry-pi', asr_confidence=1.0, custom_entities=None)", session_id='default-porcupine_raspberry-pi-c74dddb5-30bb-469a-9693-cea258a92ddc')
[DEBUG:2021-08-18 12:55:47,963] rhasspyremote_http_hermes: Publishing 513 bytes(s) to hermes/error/nlu

Which shows that the file is not found, but I am not sure why. I am running rhasspy with the docker command listed here and have also followed this post, which led me to run
chmod +x /home/pi/.config/rhasspy/profiles/en/ and include the shebang at the top of the script.

So, I am at a loss as to why this is not being recognized. Does anyone have any ideas?

EDIT: I tried with an absolute path but that did not work either:

FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.config/rhasspy/profiles/en/': '/home/pi/.config/rhasspy/profiles/en/'

Bump, would it be possible to get some advice on this? Still not working…

Seems all settings are correct…

Maybe you can try “/profiles/en/”?

1 Like

Thanks for the help, this finally worked! I thought I had tried this before, but ended up wiping out a lot of stuff and reconfiguring the script and Rhasspy. It worked when I moved it to that location and chmod +x it.