#Event trigger from speech to text

1 messages · Page 1 of 1 (latest)

sturdy lark
#

Hi, is there any event trigger that can be used to catch STT from ex. Voice assistant PE
I have tried to listen on conversation.processed, intent_end, stt-end but none of those generates any results.

exotic osprey
#

By default there's no such event. You have to take control and write that yourself.
I included this to Koala/Respeaker satellite by default, alongside with on-device alarm clock. You may copy the code from there.

sturdy lark
exotic osprey
#

Nope.

obtuse pulsar
sturdy lark
#

Looking for a way to include "response_format": "json_object" in the system prompt since it's not supported by HA engine yet.

obtuse pulsar
# exotic osprey It's event `esphome.tts_uri`

I've looked at the sensor and it's not suitable for my task. Is there any way to create a text sensor that will store the value from this step?

[19:43:59][D][voice_assistant:670]: Speech recognised as: "Yes"
exotic osprey
#

Here: https://esphome.io/components/voice_assistant.html it says:

on_stt_end (Optional, Automation): An automation to perform when the voice assistant has finished speech-to-text. The resulting text is available to automations as the variable x.

So just use on_stt_end and send the event from there.

#

I will include it into next Koala/Respeaker too.

#

Will be something like this:

    on_stt_end:
      - homeassistant.event:
          event: esphome.stt_text
          data:
            text: !lambda return x;
exotic osprey
#

Yup, it works, and sends event that you can use in automations:

event_type: esphome.stt_text
data:
  device_id: b82c7a26a1d7dd97ae66bec7802609dc
  text: What's the weather?

Basically use device_id to get area or satellite name, and there's the text.

obtuse pulsar