Skip to content

Instantly share code, notes, and snippets.

@MichaelMKKelly
Last active May 22, 2025 08:03
Show Gist options
  • Save MichaelMKKelly/b547586a41b925f57bba3617a4740181 to your computer and use it in GitHub Desktop.
Save MichaelMKKelly/b547586a41b925f57bba3617a4740181 to your computer and use it in GitHub Desktop.

How to add a delay to voice assistant activation M5Stack Atom Echo so other devices have priority

Start from known firmware state

Install the latest stock ESPHome firmware for the voice assistant on the atom echo

Plug the device into PC and visit this website - https://esphome.io/projects/ select voice assistant and the atom echo device connect and install firmware and configure to wifi credentials

Adopt the device into the ESPHome Builder Tool on home assistant

Go through the process of adopting and setting encryption key

Modify the yaml to remvoe wake word and add button to activate

Change the firmware package

in the packages section you will see this line:

m5stack.atom-echo-wake-word-voice-assistant: github://esphome/wake-word-voice-assistants/m5stack-atom-echo/m5stack-atom-echo.yaml@main

change this to:

m5stack.atom-echo-wake-word-voice-assistant: github://MichaelMKKelly/wake-word-voice-assistants/m5stack-atom-echo/m5stack-atom-echo.yaml@delayed-wake

Compile and Flash

Press Save - Press Install - Select "Wirelessly"

Finetuning

Once installed this firmware will delay the start of voice assistant by 500ms by default.

this was chosen as it accounts for the 300ms of the wake sound of a VoicePE and then 200ms to ensure VoicePE will win a collision

NB: used to be 400 (300+100) but it was changed at 2025.5 as it seemed to need it

To Adjust this you can add a line to your substitutions section. for example if you want to turn off the wake sound on the PE and require only a 300ms delay (this used to be only 100 but after 2025.5 moving to 300 seemed to be needed)

detection_delay: 300ms

This will overwrite the 500ms in the package.

Note: ESPHome 2025.5 update

I updated this to support preannounce media and continued conversation using the new components released with 2025.5

However the delays had to be adjusted for some reason I am not sure of. it is now by default 500ms and can be shortened to 300 if you remove the wake sound from a VPE.

Disclaimer

You are switching your device to install a firmware package from my fork repo instead of an official esphome repo. my repo may not be as quick to update as official repos in terms of bugfixes etc... and there is always a risk when installing firmware from an unofficial source so you use at your own risk.

If you are uncomfortable using this firmware config then you should reflash back to stock firmware from the link in the first section of this guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment