Voice assistant LED while listening

Is there a way for a visual indication that the voice assistant is listening. I see the echo does it and has some code, to check the status, but how do I do it in home assistant automation or script?
Using openwakeword or porcupine1, Piper, Assist microphone and Whisper running on remote server.

All works well, I get the awake sound from the speaker but want to trigger an LED as well.
Would also love to use the voice output with a LED that can change the brightness (if you get what I’m trying to day).

Any hints or resources to check. Thanks

The m5stack yaml contains that. It works fine for me with a rgb led: https://github.com/esphome/firmware/blob/32d1b4c2aa896bb68cb4c881c879457eac7326e8/voice-assistant/m5stack-atom-echo.yaml

I should have mentioned.

I am not using the m5stack. I am using a USB microphone directly to the motherboard of home assistant server.
I have an Arduino mega connected, so the mega will have the LED.

HI !

Just using porcupine1/openwakeword and/or Snowboy states changing for my automation flashing hue bulb 3 sec when start listing

Using only state change is based on the time. I have tried that.
I want to catch events like…
on_listening:
on_tts_start:
on_end:

Only on_listening with my tip ( with usb mic on HA Assist-microphone)

On my ESP32 , all the events works with W2812B ring led on it ( on listening : blue scan , on_tts: Green Pulse , on_end: Red )

I see.

When openwakeword changes state or any attributes also triggers. So thats the same as listening?

For me to get more lighting control and conditions I will have to use esp32.