TTS Payload from Hassio on Base to Satellite Audio (HTTP)

Hi there,

I’m trying to have Home Assistant “reply” when commands are issued through Rhasspy. I’ve looked at this thread, which seems to be MQTT, but I’m set up for HTTP. Is it possible with this method?

My set up is as follows:

Rhasspy satellite on RasPi (wake, record, audio playing, dialogue management)
Rhasspy base station as Home Assistant add-on (STT, Intent Recognition, TTS, Intent Handling)

It seems like the below might be the way to do it based on other threads, but I’m not sure and it hasn’t worked so far:

Configuration.yaml

rest_command:
    rhasspy_speak:
        url: 'http://1.2.3.4:12101/api/text-to-speech'
        method: 'POST'
        headers:
            content_type: 'text/plain'
        payload: '{{payload}}'

Intent:

intent:
intent_script:
    GetTest:
        action:
        - data_template:
            payload: "this is a test"
          service: rest_command.rhasspy_speak

Should the “base” station have “Remote HTTP” set for audio playing? I did try to test it via a CURL POST (like in this thread) but it didn’t like it (could be I did it wrong). My audio commands work successfully, I’m just not sure how to “reply”!

Any assistance would be greatly appreciated.

When you use this, the text-to-speech will output audio on your base

If you want to have audio played on a sat, you need to add ?siteId=<satname>

https://rhasspy.readthedocs.io/en/latest/reference/#endpoints

However, your rhasspy_speak does not end the session, so a timeout will occur on that session.

I always advice to use events an automations, like my examples here:

Thanks for your quick response!That all makes sense, I’ll look into your automation.

On the other note, I haven’t named either of sites, should I name my satellite and base separately? They are both currently set to default.
Does this then need to be included in each section? So for example, if my satellite is named [SAT1], does my TTS module on the base station have to include [SAT1] in the Satellite siteId section?

I am not sure what the behaviour is when both base and sat are default. Apparently the text-to-speech is confused. I think that is you set the IP adress in the speech to the one from the satellite, it will already work.
But then you have to setup the text-to-speech on each satellite, which is no problem if you have one and the base is actually no audio in/out device

I suggest renaming the sat and then add the siteId in all “Satellite siteId’s” inputboxes in the various settings.
You can easily expand with more satellites that way as well.

OK thank you, I’ll do that. The base has no audio in or out yes, it’s on my server in the cabinet, but I will likely add more satellites.

Of course the Satellite siteIds for TTS and Speech-to-Text should be filled in with the satellite name, but should Intent Recognition and Intent Handling also? Sorry if this is an obvious answer.

I have done so yes, but you could experiment with it and see what works or not

Yeah I just tried, the satellite has to be named in all areas for it to work.

Thank you for your help.