Intent not sent to Remote Server

I’m using Rhasspy (2.5.11) within Docker to provide voice control to one of my DIY projects.

The docker-compose file i used to create the container was:

rhasspy:
    image: "rhasspy/rhasspy"
    container_name: rhasspy
    restart: unless-stopped
    volumes:
        - "$HOME/docker/rhasspy/profiles:/profiles"
        - "/etc/localtime:/etc/localtime:ro"
    ports:
        - "12101:12101"
    devices:
        - "/dev/snd:/dev/snd"
    command: --user-profiles /profiles --profile en

Wake word works, Intent Recognition works but the Intent Handling never sends the intent to the Remote Server.

Using the in-built sentences, the logs show that my voice and intent are being recognized correctly but the logs show no attempt to send the intent to the remote server, no additional entries appear after “NluIntent” and the logs at the Remote Server end show no incoming POST request.

[DEBUG:2022-05-21 00:35:08,865] rhasspyserver_hermes: <- NluIntent(input='what time is it', intent=Intent(intent_name='GetTime', confidence_score=1.0), site_id='default', id=None, slots=[], session_id='default-Mercury-14bc2f3c-803a-4c45-b7e9-5fb5966884e3', custom_data='Mercury', asr_tokens=[[AsrToken(value='what', confidence=1.0, range_start=0, range_end=4, time=None), AsrToken(value='time', confidence=1.0, range_start=5, range_end=9, time=None), AsrToken(value='is', confidence=1.0, range_start=10, range_end=12, time=None), AsrToken(value='it', confidence=1.0, range_start=13, range_end=15, time=None)]], asr_confidence=1.0, raw_input='what time is it', wakeword_id='Mercury', lang=None)
[DEBUG:2022-05-21 00:35:05,820] rhasspyserver_hermes: <- HotwordDetected(model_id='/profiles/en/raven/Mercury/example-1.wav', model_version='', model_type='personal', current_sensitivity=0.5, site_id='default', session_id=None, send_audio_captured=None, lang=None, custom_entities=None)

My config is:

{
    "dialogue": {
        "system": "rhasspy"
    },
    "handle": {
        "remote": {
            "url": "http://10.10.9.14:13080/message"
        },
        "system": "remote"
    },
    "intent": {
        "system": "fsticuffs"
    },
    "microphone": {
        "arecord": {
            "device": "sysdefault:CARD=ATR4697USB"
        },
        "pyaudio": {
            "device": "1"
        },
        "system": "arecord"
    },
    "sounds": {
        "system": "aplay"
    },
    "speech_to_text": {
        "system": "kaldi"
    },
    "text_to_speech": {
        "system": "espeak"
    },
    "wake": {
        "raven": {
            "keywords": {
                "Mercury": {
                    "enabled": true
                }
            }
        },
        "system": "raven"
    }
}

Documentation i followed:

Are there any steps i’ve missed in order to get the Intent sent as a POST request to my Remote Server?

Very, very far from an expert, (or even moderately competent :slight_smile: ) but I’ve run into issues with networking in docker on a couple of my projects. Is your project reachable from within the Rhasspy docker container?

Thanks for the reply, i too have had my fair share of Docker networking issues but i can open a shell within the rhasspy docker container and send a message to my remote server with success so i didn’t think it was the networking.

dev@playground:~ $ docker exec -it rhasspy bin/bash
root@b70732b2e67f:/# ping 10.10.9.14
PING 10.10.9.14 (10.10.9.14) 56(84) bytes of data.
64 bytes from 10.10.9.14: icmp_seq=1 ttl=64 time=0.355 ms
64 bytes from 10.10.9.14: icmp_seq=2 ttl=64 time=0.199 ms
64 bytes from 10.10.9.14: icmp_seq=3 ttl=64 time=0.190 ms
64 bytes from 10.10.9.14: icmp_seq=4 ttl=64 time=0.191 ms
64 bytes from 10.10.9.14: icmp_seq=5 ttl=64 time=0.191 ms
64 bytes from 10.10.9.14: icmp_seq=6 ttl=64 time=0.147 ms
64 bytes from 10.10.9.14: icmp_seq=7 ttl=64 time=0.177 ms
^C
--- 10.10.9.14 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 152ms
rtt min/avg/max/mdev = 0.147/0.207/0.355/0.062 ms
root@b70732b2e67f:/# curl -X 'POST' \
>   'http: //10.10.9.14:13080/message' \
>    -H 'accept: */*' \
>    -H 'Content-Type: application/json' \
>    -d '{
>    "entities": [
>        {
>            "end": 11,
>            "entity": "name",
>            "raw_end": 11,
>            "raw_start": 5,
>            "raw_value": "kitchen",
>            "start": 5,
>            "value": "kitchen",
>            "value_details": {
>                "kind": "Unknown",
>                "value": "kitchen"
>            }
>        },
>        {
>            "end": 20,
>            "entity": "state",
>            "raw_end": 20,
>            "raw_start": 18,
>            "raw_value": "off",
>            "start": 18,
>            "value": "off",
>            "value_details": {
>                "kind": "Unknown",
>                "value": "off"
>            }
>        }
>    ],
>    "intent": {
>        "confidence": 1,
>        "name": "ChangeLightState"
>    },
>    "raw_text": "turn kitchen light off",
>    "raw_tokens": [
>        "turn",
>        "kitchen",
>        "light",
>        "off"
>    ],
>    "slots": {
>        "name": "kitchen",
>        "state": "off"
>    },
>    "text": "turn kitchen light off",
>    "tokens": [
>        "turn",
>        "kitchen",
>        "light",
>        "off"
>    ],
>    "wakeword_id": "default"
>}
root@b70732b2e67f:/#

The message then shows up in the logs of my remote server with a bunch of debug info that i was using to pull info out of the POST’d JSON:

[20220521] Message contains name [kitchen] and state [on].

Although since you mentioned networking, there are some things i still haven’t tried.

  • The Remote Server is just a simple console application, i could put it in another container and see if Rhasspy can communicate with it through the docker internal network (172.x.x.x)

  • If that doesn’t work i could create a docker network and re-run the container with that specific network and see if they can communicate using the container name instead of an ip

I only just noticed that i forgot to include the version of Rhasspy i’m using (2.5.11).

Just to rule out any docker weirdness (since they’re both on the default bridge network), i created a new docker network called messaging using docker network create messaging

Then i reconfigured both containers to use the new messaging network, which i confirmed using docker inspect messaging, under containers i can see both Rhasspy and Mercury (app)

[
    {
        "Name": "messaging",

        ...removed for compactness...

        "Containers": {
            "039abdee87f58d0e69ea517befc00430ed4908e443e19c6ff208d200b2404eb5": {
                "Name": "rhasspy",
                "EndpointID": "b834e3d18cb1416d89677425442af488b9be7cd8957337cd5b3644da02b4715b",
                "MacAddress": "02:42:ac:14:00:02",
                "IPv4Address": "172.20.0.2/16",
                "IPv6Address": ""
            },
            "1b80d827d21a8755e7f46f48c01b254b632486f532f91f02fa947d784301d8a6": {
                "Name": "mercury",
                "EndpointID": "337bf33619ca201de672538ae75657ad61c8b3755db145cd93c9a73d06558fa7",
                "MacAddress": "02:42:ac:14:00:03",
                "IPv4Address": "172.20.0.3/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

After which i tried these addresses under Remote Server but none of them worked*:

  • http:// 10.10.9.14:13080/message (port needed for external network)
  • http:// 172.20.0.3/message (runs on port 80 inside container so no port needed)
  • http:// mercury/message (custom network allows communicating via container name)

There are no spaces in the Rhasspy config, there are in the topic message because the message board gets upset that i’m trying to put in more than 2 links.

I guess the Remote Server feature just doesn’t like me.