M5Stack Atom Echo as voice assistant: simply not working

I was following $13 voice assistant for Home Assistant - Home Assistant closely. I spent already almost 3 freaking hours.

Current status:

  1. Strange that during the flashing at Web - ESPHome no “Install Voice Assistant” was shown
  2. Instead I had to manually insert all the magic in the device.yaml, currently looking like below
  3. Now I have the ESPHome device with a few entities:
  • light.esp_voice_satellite
  • assist_satellite.esp_voice_satellite
  • select.esp_voice_satellite_assistent
  • update.esp_voice_satellite_firmware
  • select.esp_voice_satellite_sprechpausen_erkennung
  • select.esp_voice_satellite_aktivierungswort ← UNAVAILABLE
  1. Final result:
  • :warning: Entity “select.esp_voice_satellite_aktivierungswort” is UNAVAILABLE
  • :warning: Device does not react to the configured wake word, nor when pressing the local button. No LED activity or anything else indicating the device is actually working.
esphome:
  name: esp-voice-satellite
  friendly_name: ESP Voice Satellite

esp32:
  board: m5stack-atom
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxx"

ota:
  - platform: esphome
    password: "xxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: xxx.xxx.xxx.xxx
    gateway: xxx.xxx.xxx.xxx
    subnet: xxx.xxx.xxx.xxx

# -----------------------------
# Audio Setup (Atom Echo)
# -----------------------------
# -----------------------------
# I2S Audio Bus
# -----------------------------
i2s_audio:
  - id: i2s_in
    i2s_lrclk_pin: GPIO33
    i2s_bclk_pin: GPIO19
  - id: i2s_out
    i2s_lrclk_pin: GPIO22
    i2s_bclk_pin: GPIO21

# Mikrofon (I2S, Eingang)
microphone:
  - platform: i2s_audio
    id: mic
    i2s_audio_id: i2s_in
    i2s_din_pin: GPIO23
    adc_type: external
    sample_rate: 16000
    bits_per_sample: 16bit

# Lautsprecher (I2S, Ausgang)
speaker:
  - platform: i2s_audio
    id: spk
    i2s_audio_id: i2s_out
    i2s_dout_pin: GPIO26
    dac_type: external

# Voice Assistant Binding
voice_assistant:
  id: va
  microphone: mic
  speaker: spk
  use_wake_word: true
  noise_suppression_level: 2


# -----------------------------
# Status LED (RGB-LED vorne)
# -----------------------------
light:
  - platform: esp32_rmt_led_strip
    id: status_led
    name: "LED"
    pin: GPIO27
    num_leds: 1
    chipset: SK6812
    rgb_order: GRB
    effects:
      - pulse:
      - strobe:
      - random:

What - the hell - is wrong or missing? I ran totally out of ideas. I think the main point is the web flasher not directly offering to flash the Atom Echo as “voice assistant”. That’s a classic fiddling-around-with-horrible-user-experience-situation again. No idea what’s wrong.

Edit: Screening $13 voice assistant for Home Assistant - Home Assistant once again I found the little nice note

For advanced users: The configuration file is available on GitHub.

As the later step 3

Select Install Voice Assistant, then Install.

never appeared for me (even factory resetting a few times) I decided to head over to wake-word-voice-assistants/m5stack-atom-echo/m5stack-atom-echo.yaml at e28f78adf243b6885442fc80f09071618baad8c0 · esphome/wake-word-voice-assistants · GitHub and use that as my device.yaml, merged with my existing wifi and api component settings.

Now the entities are there, it and I can start trying to use the Atom Echo finally.

I have no idea why the “Install Voice Assistant” never was presented - or while I thought it’s a good idea to let AI create the necessary .yaml content for the Atom Echo. Or why the Atom Echo did not get discovered via Bluetooth like it did in https://youtu.be/t64h2ngFIwg?si=8t77IOG2s6w3UIP8&t=62.

So many things coming together not really working… great, smart home hardware at it’s best :slight_smile:

That whole voice assistant game still is just way too complicated. One error and - et voila - 4 hours are just gone. Forever.

Edit 2:

  1. :x: Wake word detection works - at least sometimes. Then the Atom Echo is dead not reacting to voice commands at all, needing a restart. No matter if on device or HA engine is set.
  2. :white_check_mark: → Fixed by correct wifi settings (device had no DNS). Playing files is possible now. /// Playing a sound file using the media_player entity is not working - I never heard something coming from the Atom Echo’s internal speaker. Passing a media file gives this in the device’s log:
[23:30:56][E][speaker_media_player:326]: The announcement pipeline's file reader encountered an error.
[23:30:56][E][speaker_media_player.pipeline:112]: Media reader encountered an error: ESP_ERR_HTTP_CONNECT
[23:30:56][E][speaker_media_player:326]: The announcement pipeline's file reader encountered an error.
[23:30:56][E][speaker_media_player.pipeline:112]: Media reader encountered an error: ESP_ERR_HTTP_CONNECT
[23:30:56][E][speaker_media_player:326]: The announcement pipeline's file reader encountered an error.
  1. :x: It does not recognize any text spoken and therefore never gives an answer. Log says
[23:15:00][D][voice_assistant:623]: Event Type: 11
[23:15:00][D][voice_assistant:824]: Starting STT by VAD
[23:15:02][D][voice_assistant:623]: Event Type: 12
[23:15:02][D][voice_assistant:828]: STT by VAD end
[23:15:02][D][voice_assistant:477]: State changed from STREAMING_MICROPHONE to STOP_MICROPHONE
[23:15:02][D][voice_assistant:484]: Desired state set to AWAITING_RESPONSE
[23:15:02][D][voice_assistant:477]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[23:15:02][D][light:052]: 'ESP Voice Satellite' Setting:
[23:15:02][D][light:076]:   Red: 0%, Green: 0%, Blue: 100%
[23:15:02][D][light:126]:   Effect: 'Fast Pulse'
[23:15:03][D][voice_assistant:477]: State changed from STOPPING_MICROPHONE to AWAITING_RESPONSE
[23:15:03][D][voice_assistant:623]: Event Type: 0
[23:15:03][E][voice_assistant:796]: Error: stt-no-text-recognized - No text recognized
[23:15:03][D][voice_assistant:605]: Signaling stop
[23:15:03][D][voice_assistant:477]: State changed from AWAITING_RESPONSE to STOP_MICROPHONE

No idea what’s the reason for the [23:15:03][E][voice_assistant:796]: Error: stt-no-text-recognized - No text recognized.

Feels like the onboarding experience continues the same way like the usage experience.

M5 has been giving me issues for a while. I have one device with bad speaker and another with power issue(both my breaking) so I haven’t tried troubleshooting but I know replies haven’t worked.

How did you install HA?

What is your STT provider?

Check the Homeassitant URLs in HA Network settings. I belive the local address must be accessible to STT provider.

I don’t thing your STT provider is able to get data for playback. I believe that’s what the error infers.

1 Like

Indeed the hardware itself is… „nice“ but more on the play around level, definitely not in the productive ready corner. For me, collecting first experiences with a voice assistant it is a good start - at least I thought so until yesterday.

HA is run running on HA OS. STT „speech-to-phrase“ is installed and configured in the voice assistant which is used by the Atom Echo.

Today

  • sometimes it worked a few times (even for many/most times the wake word is not working, drives me really crazy jelling at that piece of hardware multiple times while I could simply use the physical switch next to it to turn the light on/off etc.)
  • and I even could turn on/off lights. …well, even it should be location/area aware, by just saying „turn on/off the lights“ it switched on/off lights in completely other areas. Maybe the STT was not working good enough or the set aliases are too confusing.

I don‘t know, it just fails, is a horrible overall user experience and lightyears away from productively usable.

For the Home Assistant URL: that might be a hot take. It is not set (never was, working that way for years), only the local network address, because it is not exposed externally. Is this URL needed?

Checking the ESP logs I also discovered this warning now:

That look like the issue

Since you works occasionally the problem likely is esp. not sure how to reduce memory.

I get different error where Wake word detect doesn’t seem to restart after announcement. M5 overall is not good for assistant. I think it would be useful for connecting to another device for announcement. Its wake detection was always poor and volume too low. HA Voice PE was significant improvement.

The local/on device wake word detection requires the compiling of some memory intensive components, maybe removing this would free some memory.

But there are two remaining issues:

  1. Wake word often not detected at all —> potentially the local memory issue, minuses how to solve it
  2. Often no STT. I configured faster-whisper as STT service in the voice assistant. Now pretty reliably STT is working, but checking the addon logs and seeing what it detects is so so horrible. Like an alien trying to speak my language for the very first time, largely totally different words. So: reliable in terms of technically working, but unusable looking at the output. Back to speech-to-phrase addon it simply fails with the error in ESP log. The STP addon log does not show any signs of received audio or detected text.

So I think I should debug the ESP to HA to STP addon connection next, somehow.

—> Update: with the addon set to debug mode it shows at least some activity and seems to do local basic tasks, but fails at LLM stuff like „What is 5 x 5?“.

Argh it’s so frustrating. Looking forward to a plug and play HA voice assistant device. The preview edition also sounds like a lack of confidence regarding productive, hassle-free, Amazon Echo-like usage.

True. I will look at this on my devices as well.

There a pieces everywhere and that makes it hard

Esp log
Logs for STT, TTS and so on
There is debug at setting >> voice assistant >> 3 vertical dot next to your assistant >> “debug” that can be useful

Would be nice if debugging was a bit more centralized

Not as good as echo but significantly better than M5 or S3 box. I had echo in every room —2 in some rooms — and spent time understanding strength/weakness. I have not done that with Voice PE. In recent days I’ve used more and belive it may be closer to Amazon than I thought. Being that it’s open I feel there is some potential for optimizing that will improve this. Voice PE has potential.

Update:

  1. :white_check_mark: Issue one - not working micro word detection - solved (worked around) with M5Stack Atom Echo stops listening after one voice command · Issue #122 · esphome/wake-word-voice-assistants · GitHub / Atom Echo works for a while after restart, but then stops responding - #11 by omarahmed500
  2. :x: Issue two still exists. STT not detected, not correctly detected etc… Maybe it’s the microphone, maybe it’s the STT addon, maybe… voice is the topic Home Assistant will never master.

2 years after the “year of the voice” and the overall experience feels like we’re in month one when Alexa was started to build.

Are there any updates?
I’ve got an Atom Echo S3R and been following this tutorial from M5Stack:

The Logs show it’s active and connected to Home Assistant, it’s configured to differend wake words but nothing is beening detected…

Going to share some of my posts for the original atom echo and S3R variants here…

I did a bunch of testing and eventually came up with a working config for the atom echo while using a streaming wake word in HA: Atom Echo works for a while after restart, but then stops responding - #18 by afloat5271

I also recently got my hands on the S3R. It also required some tweaking, but combining the m5stack yaml and my wake word snippet from this post seems to work well for an on-device wake word: Initial Atom Echo S3R impressions and optimizing the wake word config

Hope this helps!