Atom Echo error stt-stream-failed

Hello,

when testing the Atom Echo in home assistant i get a speach-to-text (stt-stream-failed) error:

stage: error
run:
  pipeline: 01gzhmp16k520wkky2trnhevtv
  language: en
events:
  - type: run-start
    data:
      pipeline: 01gzhmp16k520wkky2trnhevtv
      language: en
    timestamp: "2023-06-11T08:10:22.393595+00:00"
  - type: stt-start
    data:
      engine: cloud
      metadata:
        language: en-GB
        format: wav
        codec: pcm
        bit_rate: 16
        sample_rate: 16000
        channel: 1
    timestamp: "2023-06-11T08:10:22.395889+00:00"
  - type: error
    data:
      code: stt-stream-failed
      message: speech-to-text failed
    timestamp: "2023-06-11T08:10:25.320298+00:00"
stt:
  engine: cloud
  metadata:
    language: en-GB
    format: wav
    codec: pcm
    bit_rate: 16
    sample_rate: 16000
    channel: 1
  done: false
error:
  code: stt-stream-failed
  message: speech-to-text failed

the yaml code for ESPHome:

substitutions:
  name: m5stack-atom-echo-80c07c
  friendly_name: M5Stack Atom Echo 80c07c
packages:
  m5stack.atom-echo-voice-assistant: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: /12345567787985646446546  //edited

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

When i press the button the blue light turns on but after speaking and releasing the button the light turns to red, searched the forum and internet, but didn’t find a solutions.

Any tips on how to debug this?

Thank you

3 Likes

I have exactly the same problem using Home Assistant Cloud speech-to-text

i was hoping an update would fix the problem but just did one this morning and still the same problem.

I just figured out why it didn’t work for me. I had the Atom Echo on different VLAN than the HA server and the communication was somehow blocked by firewall rules. I just moved it to my main LAN and it finally works.

All my ESPHOME devices work fine from a separate VLAN but for some reason Echo Atom didn’t.

2 Likes

Thanks for the info, but i don’t have VLANs

Thank-you for this. Exactly the same issue for me with the Atom on my IOT network which is VLAN’d off from my main LAN.

1 Like

Hello,

My setup:

So when I hit the button, it starts red for 1 sec. then BLUE until I release it and it starts to flash/blink BLUE for 30 sec. and ends with red for 1 sec.
Again I have the same error as in the Topic mentioned.

Extra input:

I see the logbook is telling me it is working on it; 30 sec. later it stops.
So the log is not telling me much other then that the Assistant sensor is busy. So please let someone explain what am I doing to resolve this. Thanks.

Are you using the built-in commands?
Have you exposed the required entities?
Does the command work if you type it in on the assist communication dialog? (Three dots on top right side of dashboard)

today i found this error in the logs:

Logger: homeassistant.components.assist_pipeline.pipeline
Source: components/esphome/voice_assistant.py:147
Integration: Assist pipeline (documentation, issues)
First occurred: 5:22:43 AM (1 occurrences)
Last logged: 5:22:43 AM

Unexpected error during speech-to-text
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 447, in speech_to_text
    result = await self.stt_provider.async_process_audio_stream(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cloud/stt.py", line 92, in async_process_audio_stream
    result = await self.cloud.voice.process_stt(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hass_nabucasa/voice.py", line 1262, in process_stt
    async with self.cloud.websession.post(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 581, in write_bytes
    await self.body.write(writer)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/payload.py", line 443, in write
    chunk = await self._iter.__anext__()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/esphome/voice_assistant.py", line 147, in _iterate_packets
    raise RuntimeError("Not running")
RuntimeError: Not running

followed by this one a few miliseconds later:

Logger: homeassistant.components.cloud.stt
Source: components/cloud/stt.py:98
Integration: Home Assistant Cloud (documentation, issues)
First occurred: 5:22:48 AM (1 occurrences)
Last logged: 5:22:48 AM

Voice error: Error processing en-GB speech: 400 No audio data received

What’s ‘not running’ and how can i fix that?

Thanks

@scorpio862 or @Damaar : Before I crack open Wireshark, did either of you figure out what firewall or NAT rule was necessary to allow the STT pipeline?

no, i didn’t

@shbatm , would love to see your wireshark results. I did a bit of digging in Wake word is rolled out? - #33 by Lakini and ran into the issue of some access points just blocking UDP traffic after a while or if the number of packages per time gets too high…

Has anyone managed to figure this out?
Running into the same issue… I can use assist from the browser no problems, but get the stt-stream-failed error using the Atom Echo.

In my case it’s a networking issue, to test this i installed pfSense on a VM to act as my router and my ESPhome assistants started to work. Unfortunately my little home server is not powerful enough to host pfSense so i had to revert to my old situation with things not working. When i figure out what the issue is I will report back here.

Thank you for this tip! I just about gave up on using these devices because of this issue. For now I’m happy to use them on my main LAN if it means I can actually use it. I switched over both the media player and voice assistant versions are working!