Multiple MQTT messages sent

Hi everybody,

I have 2 satellites and 1 master. I’ve made screenshots of their configuration (according to https://rhasspy.readthedocs.io/en/latest/tutorials/#http-example).

sat1c sat2c

Now when I speak a command it’s recognized and processed. However when looking at it with an MQTT client the first message is not necessarily the one I’d expect because it has the site_id “master”:

hermes/intent/StocksQuery

{ “input”: “Wo steht der dax”, “intent”: {“intentName”: “StocksQuery”, “confidenceScore”: 1.0}, “siteId”: “master”, “id”: “44810b6c-10f8-47f9-9d22-f3f5eec1dde3”, “slots”: [{“entity”: “stockName”, “value”: {“kind”: “Unknown”, “value”: “dax”}, “slotName”: “stockName”, “rawValue”: “dax”, “confidence”: 1.0, “range”: {“start”: 13, “end”: 16, “rawStart”: 13, “rawEnd”: 16}}], “sessionId”: “44810b6c-10f8-47f9-9d22-f3f5eec1dde3”, “customData”: null, “asrTokens”: [[{“value”: “Wo”, “confidence”: 1.0, “rangeStart”: 0, “rangeEnd”: 2, “time”: null}, {“value”: “steht”, “confidence”: 1.0, “rangeStart”: 3, “rangeEnd”: 8, “time”: null}, {“value”: “der”, “confidence”: 1.0, “rangeStart”: 9, “rangeEnd”: 12, “time”: null}, {“value”: “dax”, “confidence”: 1.0, “rangeStart”: 13, “rangeEnd”: 16, “time”: null}]], “asrConfidence”: null, “rawInput”: “wo steht der dax”, “wakewordId”: null, “lang”: null}

Then I get a second message to topic hermes/intent/StocksQuery, actually this is the one I’d expect because the voice input was done from satellite02:

{“input”: “wo steht der dax”, “intent”: {“intentName”: “StocksQuery”, “confidenceScore”: 1.0}, “siteId”: “satellite02”, “id”: null, “slots”: [{“entity”: “stockName”, “value”: {“kind”: “Unknown”, “value”: “dax”}, “slotName”: “stockName”, “rawValue”: “dax”, “confidence”: 1, “range”: {“start”: 13, “end”: 16, “rawStart”: 13, “rawEnd”: 16}}], “sessionId”: “satellite02-porcupine-bbee7176-f572-4343-8c1e-416164632aa6”, “customData”: null, “asrTokens”: [[{“value”: “wo”, “confidence”: 1.0, “rangeStart”: 0, “rangeEnd”: 2, “time”: null}, {“value”: “steht”, “confidence”: 1.0, “rangeStart”: 3, “rangeEnd”: 8, “time”: null}, {“value”: “der”, “confidence”: 1.0, “rangeStart”: 9, “rangeEnd”: 12, “time”: null}, {“value”: “dax”, “confidence”: 1.0, “rangeStart”: 13, “rangeEnd”: 16, “time”: null}]], “asrConfidence”: null, “rawInput”: “wo steht der dax”, “wakewordId”: “porcupine”, “lang”: null}

My application will respond to it and publish to hermes/tts/say

{
“text”:“Der Kurs des dax steht bei 13313.24”,
“site_id”:“master”,
“lang”:“de-DE”,
“id”:“cf9320fc-f5d4-4436-8347-cbbb552c4722”,
“session_id”: “”,
“volume”:“1.0”
}

However I can then see another message to hermes/tts/say

{“text”: “Der Kurs des dax steht bei 13313.24”, “siteId”: “master”, “lang”: “de-DE”, “id”: “26701501-1ccf-43f7-9587-87480af6e688”, “sessionId”: “”, “volume”: 1.0}

And a 3rd one:

{“text”: “Der Kurs des dax steht bei 13313.24”, “siteId”: “master”, “lang”: “de-DE”, “id”: “067acefc-7527-454a-a2e5-a535006b69dc”, “sessionId”: “”, “volume”: 1.0}

And because of the above second message to hermes/intent/StocksQuery there will be even 3 more say-messages because my program will (correctly) respond to another StocksQuery request.

Can you guys see any mistakes I have made in the configuration?

I see that you selected external mqtt. Are you using the same mqtt server for the master and the satelites?

Yes, they are all connected to the same MQTT server. Is that a problem here? You sound like it could be :face_with_monocle:

I assumed it couldn’t hurt as MQTT seems to be the alternative method of connecting master and satellites. I understood without whitelisting the satellites there it wouldn’t do anything with the messages.

In your TTS message that you send you are using site_id when it should be siteId according to the reference. This could be causing some problems.

As you are already using a shared mqtt broker it makes more sense to use that for the satelite setup. Maybe it already picks some things up from mqtt and that causes the duplication.

Also a small tip from my personal experience, Kaldi is the more accurate STT system for german.

As always: Thanks a lot!

Changing site_id to siteId in my application’s response already did the trick. The response is now only played once - as desired.
Maybe I’ll try the setup with using MQTT.

Thanks for the STT tip, I’ll give it a try.