Error with Atom Echo not catching sound

I have set up porcupine1 + vosk + Piper.

If I go to Debug Assistant and use my laptop mic, the wake word works fine and the command also.

I have installed a m5 Atom Echo using https://github.com/esphome/firmware/blob/fd24297932de474d8a552c1d238ba508153ad687/voice-assistant/m5stack-atom-echo.yaml

I have set up Assist on HA.

From HA, I can for example turn off Use listen light so I think the connection between HA and my Atom echo is correct.

But I’m not able to tell any command nor use the wake word with my Atom echo.

When I check logs of my Atom echo, I see this:

INFO ESPHome 2024.3.1
INFO Reading configuration /config/esphome/m5-atom.yaml...
INFO Updating https://github.com/esphome/esphome.git@pull/5230/head
INFO Generating C++ source...
INFO Updating https://github.com/espressif/[email protected]
INFO Updating submodules (components/esp-sr, components/esp-adf-libs) for https://github.com/espressif/[email protected]
INFO Updating https://github.com/espressif/[email protected]
INFO Compiling app...
Processing m5-atom (board: m5stack-atom; framework: espidf; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40406.240122 (4.4.6) 
 - tool-cmake @ 3.16.4 
 - tool-ninja @ 1.7.1 
 - toolchain-esp32ulp @ 2.35.0-20220830 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Reading CMake configuration...
Dependency Graph
|-- Improv @ 1.2.3
RAM:   [==        ]  17.9% (used 58780 bytes from 327680 bytes)
Flash: [========  ]  83.5% (used 1531549 bytes from 1835008 bytes)
========================= [SUCCESS] Took 19.39 seconds =========================
INFO Successfully compiled program.
INFO Connecting to <atom_IP>
INFO Uploading /data/build/m5-atom/.pioenvs/m5-atom/firmware.bin (1537840 bytes)
Uploading: [============================================================] 100% Done...

INFO Upload took 6.58 seconds, waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from <atom_IP> using esphome API
INFO Successfully connected to m5-atom @ <atom_IP> in 7.195s
INFO Successful handshake with m5-atom-318164 @ <atom_IP> in 0.101s
[11:37:31][I][app:102]: ESPHome version 2024.3.1 compiled on Mar 30 2024, 11:25:14
[11:37:31][I][app:104]: Project m5stack.atom-echo-voice-assistant version 1.0
[11:37:31][C][wifi:580]: WiFi:
[11:37:31][C][wifi:408]:   Local MAC: E8:6B:EB:31:81:64
[11:37:31][C][wifi:413]:   SSID: [redacted]
[11:37:31][C][wifi:416]:   IP Address: 192.168.1.92
[11:37:31][C][wifi:420]:   BSSID: [redacted]
[11:37:31][C][wifi:421]:   Hostname: 'm5-atom-318164'
[11:37:31][C][wifi:423]:   Signal strength: -51 dB ▂▄▆█
[11:37:31][C][wifi:427]:   Channel: 1
[11:37:31][C][wifi:428]:   Subnet: 255.255.255.0
[11:37:31][C][esp32_rmt_led_strip:175]: ESP32 RMT LED Strip:
[11:37:31][C][esp32_rmt_led_strip:176]:   Pin: 27
[11:37:31][C][esp32_rmt_led_strip:177]:   Channel: 0
[11:37:31][C][esp32_rmt_led_strip:202]:   RGB Order: GRB
[11:37:31][C][esp32_rmt_led_strip:203]:   Max refresh rate: 0
[11:37:31][C][esp32_rmt_led_strip:204]:   Number of LEDs: 1
[11:37:31][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Button'
[11:37:31][C][template.switch:068]: Template Switch 'Use wake word'
[11:37:31][C][template.switch:091]:   Restore Mode: restore defaults to ON
[11:37:31][C][template.switch:057]:   Optimistic: YES
[11:37:31][C][template.switch:068]: Template Switch 'Use listen light'
[11:37:31][C][template.switch:091]:   Restore Mode: restore defaults to ON
[11:37:31][C][template.switch:057]:   Optimistic: YES
[11:37:31][C][factory_reset.button:011]: Factory Reset Button 'Factory reset'
[11:37:31][C][factory_reset.button:011]:   Icon: 'mdi:restart-alert'
[11:37:31][C][esp32_ble:374]: ESP32 BLE:
[11:37:31][C][esp32_ble:376]:   MAC address: E8:6B:EB:31:81:64
[11:37:31][C][esp32_ble:377]:   IO Capability: none
[11:37:31][C][esp32_ble_server:200]: ESP32 BLE Server:
[11:37:31][C][esp32_improv.component:261]: ESP32 Improv:
[11:37:32][C][ota:096]: Over-The-Air Updates:
[11:37:32][C][ota:097]:   Address: <atom_IP>:3232
[11:37:32][C][ota:103]:   OTA version: 2.
[11:37:32][C][api:139]: API Server:
[11:37:32][C][api:140]:   Address: <atom_IP>:6053
[11:37:32][C][api:144]:   Using noise encryption: NO
[11:37:32][C][improv_serial:032]: Improv Serial:
[11:37:34][D][esp32_ble:255]: Disabling BLE...
[11:37:34][D][esp-idf:000]: W (11673) BT_APPL: bta_dm_disable BTA_DISABLE_DELAY set to 200 ms
[11:37:35][W][component:232]: Component esp32_ble took a long time for an operation (233 ms).
[11:37:35][W][component:233]: Components should block for at most 30 ms.
[11:38:12][D][api:102]: Accepted <HA_IP>
[11:38:12][D][api.connection:197]: aioesphomeapi (<HA_IP>) requested disconnected
[11:38:12][D][api:102]: Accepted <HA_IP>
[11:38:12][D][api.connection:1159]: Home Assistant 2024.3.3 (<HA_IP>): Connected successfully
[11:38:47][D][switch:012]: 'Use wake word' Turning ON.
[11:38:47][D][switch:055]: 'Use wake word': Sending state ON
[11:38:47][D][voice_assistant:416]: State changed from IDLE to START_MICROPHONE
[11:38:47][D][voice_assistant:422]: Desired state set to WAIT_FOR_VAD
[11:38:47][D][light:036]: 'M5 Atom Echo 318164' Setting:
[11:38:47][D][light:047]:   State: ON
[11:38:47][D][light:051]:   Brightness: 60%
[11:38:47][D][light:059]:   Red: 100%, Green: 89%, Blue: 71%
[11:38:47][D][voice_assistant:155]: Starting Microphone
[11:38:47][D][voice_assistant:416]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[11:38:47][D][esp-idf:000]: I (84631) I2S: DMA Malloc info, datalen=blocksize=1024, dma_buf_count=4
[11:38:47][D][voice_assistant:416]: State changed from STARTING_MICROPHONE to WAIT_FOR_VAD
[11:38:47][D][voice_assistant:172]: Waiting for speech...
[11:38:47][D][voice_assistant:416]: State changed from WAIT_FOR_VAD to WAITING_FOR_VAD
[11:38:47][D][voice_assistant:185]: VAD detected speech
[11:38:47][D][voice_assistant:416]: State changed from WAITING_FOR_VAD to START_PIPELINE
[11:38:47][D][voice_assistant:422]: Desired state set to STREAMING_MICROPHONE
[11:38:47][D][voice_assistant:202]: Requesting start...
[11:38:47][D][voice_assistant:416]: State changed from START_PIPELINE to STARTING_PIPELINE
[11:38:47][D][voice_assistant:437]: Client started, streaming microphone
[11:38:47][D][voice_assistant:416]: State changed from STARTING_PIPELINE to STREAMING_MICROPHONE
[11:38:47][D][voice_assistant:422]: Desired state set to STREAMING_MICROPHONE
[11:38:48][D][voice_assistant:523]: Event Type: 1
[11:38:48][D][voice_assistant:526]: Assist Pipeline running
[11:38:48][D][voice_assistant:523]: Event Type: 9
[11:39:13][D][esp32.preferences:114]: Saving 1 preferences to flash...
[11:39:13][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed

From here if I turn off “Use wake word”, I get:

[11:40:05][D][switch:016]: 'Use wake word' Turning OFF.
[11:40:05][D][switch:055]: 'Use wake word': Sending state OFF
[11:40:05][D][voice_assistant:516]: Signaling stop...
[11:40:05][D][voice_assistant:416]: State changed from STREAMING_MICROPHONE to STOP_MICROPHONE
[11:40:05][D][voice_assistant:422]: Desired state set to IDLE
[11:40:05][D][light:036]: 'M5 Atom Echo 318164' Setting:
[11:40:05][D][light:047]:   State: OFF
[11:40:05][D][voice_assistant:416]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[11:40:05][D][esp-idf:000]: I (162446) I2S: DMA queue destroyed
[11:40:05][D][voice_assistant:523]: Event Type: 0
[11:40:05][E][voice_assistant:653]: Error: no_wake_word - No wake word detected
[11:40:05][D][voice_assistant:516]: Signaling stop...
[11:40:05][D][voice_assistant:416]: State changed from STOPPING_MICROPHONE to STOP_MICROPHONE
[11:40:05][D][voice_assistant:422]: Desired state set to IDLE
[11:40:05][D][voice_assistant:416]: State changed from STOP_MICROPHONE to IDLE
[11:40:05][D][light:036]: 'M5 Atom Echo 318164' Setting:
[11:40:05][D][light:047]:   State: ON
[11:40:05][D][light:051]:   Brightness: 100%
[11:40:05][D][light:059]:   Red: 100%, Green: 0%, Blue: 0%
[11:40:05][D][voice_assistant:523]: Event Type: 2
[11:40:05][D][voice_assistant:613]: Assist Pipeline ended
[11:40:05][D][light:036]: 'M5 Atom Echo 318164' Setting:
[11:40:05][D][light:047]:   State: OFF
[11:40:06][D][light:036]: 'M5 Atom Echo 318164' Setting:
[11:40:13][D][esp32.preferences:114]: Saving 1 preferences to flash...
[11:40:13][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed

Now if I click on the round button on the device till I get blue light blinking, I get:

[11:41:23][D][binary_sensor:036]: 'Button': Sending state ON
[11:41:25][D][binary_sensor:036]: 'Button': Sending state OFF
[11:41:25][D][voice_assistant:416]: State changed from IDLE to START_PIPELINE
[11:41:25][D][voice_assistant:422]: Desired state set to START_MICROPHONE
[11:41:25][D][voice_assistant:118]: microphone not running
[11:41:25][D][voice_assistant:202]: Requesting start...
[11:41:25][D][voice_assistant:416]: State changed from START_PIPELINE to STARTING_PIPELINE
[11:41:25][D][voice_assistant:437]: Client started, streaming microphone
[11:41:25][D][voice_assistant:416]: State changed from STARTING_PIPELINE to START_MICROPHONE
[11:41:25][D][voice_assistant:422]: Desired state set to STREAMING_MICROPHONE
[11:41:25][D][voice_assistant:155]: Starting Microphone
[11:41:25][D][voice_assistant:416]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[11:41:25][D][esp-idf:000]: I (242597) I2S: DMA Malloc info, datalen=blocksize=1024, dma_buf_count=4
[11:41:25][D][voice_assistant:523]: Event Type: 1
[11:41:25][D][voice_assistant:526]: Assist Pipeline running
[11:41:25][D][voice_assistant:416]: State changed from STARTING_MICROPHONE to STREAMING_MICROPHONE
[11:41:25][D][voice_assistant:523]: Event Type: 3
[11:41:25][D][voice_assistant:537]: STT started
[11:41:25][D][light:036]: 'M5 Atom Echo 318164' Setting:
[11:41:25][D][light:047]:   State: ON
[11:41:25][D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[11:41:25][D][light:109]:   Effect: 'Slow Pulse'
[11:42:24][I][ota:117]: Boot seems successful, resetting boot loop counter.
[11:42:24][D][esp32.preferences:114]: Saving 1 preferences to flash...
[11:42:24][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed

One last thing: when I click on the round button, I get the blue light blinking endlessly until I click on it for a few seconds.

I don’t know what else to check or try…