#Run automation after HA processes intent from Voice PE and STT

1 messages · Page 1 of 1 (latest)

lunar kiln
#

looking for some pointers. I am trying to create an automation that would run after voice commands are issued.

Baically I want to retain the home assistant processing intent to turn of a light or change the state of any device in the system as it currently does, but what that action is complete I want an automation to run. The problem I am having is figuring out how to trigger an automation after intent has been registered and some action taken as I cannot find a way to get events from the voice assistant pipeline. Is this possible?

I have looked through previous chats and found a few that were sort of similar but the solutions did not quite get me there as I would need to get the stt value "basement light 50 percent" when the automation runs.

The automation itself would need to trigger once the voice intent starts and another would need to trigger once to action or voice pipeline completes.

tame sonnet
lunar kiln
noble drift
#

This is completely different stages, so you won't get it all at once. There's STT phase - that returns text. And then there's VA done phase.
So you'd need to catch STT, then wait for VA is idle - and proceed with catched text.

lunar kiln
# noble drift This is completely different stages, so you won't get it all at once. There's ST...

So this might be user error on my part but what I have been finding is that there isn't an expose event trigger for the voice assistant pipeline. I can listen for conversation but that basically interrupts the entire pipeline and it won't continue. You will get the stt value that has been parse, but I am unable to startup or continue the voice assistant pipeline from an automation.

So what I ended up doing is the following:

  1. trigger an automation on conversation list for command: "{text} <some custom word>"
  2. have an action push that {text} block into a custom python script that calls the voice assistant pipeline via websocket ( all on the home assistant device )
  3. The voice pipeline continues since the command was sent using a start stage of intent. It then sorts out the intended entity as usual and performs the action.
  4. I send the original {text} command to an ollama entity running qwen3 0.6b with instructions to have a specific personality. Since it is a super small model it loads quickly and I can just keep it running indefinitely. It returns a 1 or 2 sentence summary of what happened.
  5. I take that ollama responce and push it to the sattelite announce.

End result I now have a GLaDOS voice that has a similar personality and is super snarky and only mildly threatening, but it only triggers if I use the the custom word at the end of the command for the automation ( right now using "please" ). So if for example I want to turn on a light I can say "turn on the light" and it will be processed and completed with no feedback just the actions. But if I say "turn on the light please" it will perform the action just as quickly but the end result will be an announcement from the originating voice PE that says something like "the light is on. Wow, I expected nothing and you still disaappointed me"

noble drift
#

Yeah, there's no simple way to catch STT event. I have been adding it to ESPHome satellites manually.