TTS Not Reaching Satellite

I have Rhasspy running on a Pi4 and a PiZero as a satellite called living. When I speak my word, the zero picks it up, sends the text to the 4, runs the intent via HASS, and publishes an audio to TTS/say, but I get no audio on my zero

I have satellite siteIds for everything on the 4 (master) as living and the TTS as living on the zero (living).

here is the log from the Pi4. Is it because it on the second line it says master instead of living? Or what else am I missing? Thanks

[DEBUG:2021-11-06 00:32:38,532] rhasspyserver_hermes: Handling TtsSayFinished (topic=hermes/tts/sayFinished, id=a940bffc-2283-49b8-9ea9-b06e53c66e4f)
[DEBUG:2021-11-06 00:32:29,601] rhasspyserver_hermes: Handling AudioPlayBytes (topic=hermes/audioServer/master/playBytes/83cb2027-b83b-4eab-ae94-ca9874485423, id=a940bffc-2283-49b8-9ea9-b06e53c66e4f)
[DEBUG:2021-11-06 00:32:29,352] rhasspyserver_hermes: Publishing 236 bytes(s) to hermes/tts/say
[DEBUG:2021-11-06 00:32:29,352] rhasspyserver_hermes: -> TtsSay(text='It is 34 degrees and feels like 34. It is clear-night.  Today it will be sunny with a high of 52 and a low of 34', site_id='master', lang=None, id='83cb2027-b83b-4eab-ae94-ca9874485423', session_id='', volume=1.0)
[DEBUG:2021-11-06 00:32:29,350] rhasspyserver_hermes: TTS timeout will be 30 second(s)

What does you HA call to publish TTS look like?

Because the TTS message says master as siteId, so that is why you do not hear anything on living

In my automations.yaml

- id: '1621705864623'
  alias: Temperature
  description: ''
  trigger:
  - platform: event
    event_type: rhasspy_GetTemperature
  condition: []
  action:
  - service: rest_command.tts
    data:
      payload: It is '{{ states('sensor.openweathermap_temperature') | round(0) }}'
        but feels like '{{ states('sensor.openweathermap_feels_like_temperature')
        | round(0) }}'
  mode: single

in hass GUI

in configuration.yaml

rest_command:
    tts:
        url: 'http://192.168.1.104:12101/api/text-to-speech'
        method: POST
        content_type: text/plain
        payload: '{{payload}}'

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

It was the last bit in the configuration.yaml - I was missing the url after the ?

rest_command:
    tts:
        url: 'http://192.168.1.104:12101/api/text-to-speech?siteId={{ siteid }}'
        method: POST
        content_type: text/plain
        payload: '{{payload}}'

AND

adding the below to the data of the automations

  siteid: '{{trigger.event.data._intent.siteId}}'

There are two problems.

1: you do not use siteId from the event (ok, I see you do in the last post)
2: The rest command is not the correct topic

Fixes for both 1 and 2.
You do not need a rest command at all, but you need the sessionId.
The best way is to publish a message to endSession to Rhassy, this also ends the session so no timeouts :slight_smile:

Chang your automation like so (instead of the rest_command.tts):

  - service: mqtt.publish
    data:
      topic: hermes/dialogueManager/endSession
      payload_template: '{"sessionId": "{{trigger.event.data._intent.sessionId}}",
        "text": "It is {{ states('sensor.openweathermap_temperature') | round(0) }}
        but feels like {{ states('sensor.openweathermap_feels_like_temperature')
        | round(0) }}"}'

Because you send the sessionId, Rhasspy knows the satellite which triggered the session.
The base will process the text message and send it to the correct satellite as audio.
Note that I have remove some single quotes, I do not think the are needed.

Thanks! Can you help me understand (or point in direction of docs) how mqtt.publish does this? Is my old set up right when I had a server that was also listening and speaking? But now that I have my satellite on mqtt listening it needs to be published that way for it to properly listen?

Actually… it doesn’t work. It didn’t save your edit when i thought it had :man_facepalming:.

I got an error with the ’ inside the states. Had to escape it?

- id: '1621705864623'
  alias: Temperature
  description: ''
  trigger:
  - platform: event
    event_type: rhasspy_GetTemperature
  condition: []
  action:
  - service: mqtt.publish
    data:
      topic: hermes/dialogueManager/endSession
      payload_template: '{"sessionId": "{{trigger.event.data._intent.sessionId}}", "text":
        "It is {{ state_attr(''weather.kbos_daynight'', ''temperature'') | round(0) }}
        but feels like {{ states(''sensor.openweathermap_feels_like_temperature'') |
        round(0) }}"}'

Ah right, sorry about that. I have the single quotes escaped indeed:


payload_template: '{"sessionId": "{{trigger.event.data._intent.sessionId}}",
        "text": "{{trigger.event.data.person}} is {{states(''person.romkabouter'')}}"}'
1 Like

It is not mqtt.publish, but Rhasspy.
When you have do not use session but just send text to tts on the server, Rhasspy does not have any idea about siteId and sessions and uses the default (which is the server, because the dialogueManager on the server handles it)

The sessionId is filled, because the wakeword is triggered on the satellite.
If you keep that same sessionId, Rhasspy knows the corresponding satellite.

1 Like