Original yaml of the 13$ atom echo voice assist?

I cannot tell you right now as i am at work…
But it marks:

substitutions:
  name: "m5stack-atom-echo"
  friendly_name: "M5Stack Atom Echo"

Well post again when you can be more precise.

ERROR Error while reading config: Invalid YAML syntax:

while parsing a block mapping
  in "/config/esphome/assist-1.yaml", line 1, column 1:
    substitutions:
    ^
expected <block end>, but found '<block mapping start>'
  in "/config/esphome/assist-1.yaml", line 84, column 3:
      microphone: echo_microphone

I think its this one.

this is hard work, yaml file please.

Here it is… but its quite the original one:

substitutions:
  name: "assist-1"
  friendly_name: "assist-1"

esphome:
  name: "${name}"
  project:
    name: m5stack.atom-echo-voice-assistant
    version: "1.0"

esp32:
  board: m5stack-atom
  framework:
    type: arduino

#dashboard_import:
#  package_import_url: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main

packages:
  voice_assistant: 
    url: https://github.com/esphome/firmware
    file: voice-assistant/m5stack-atom-echo.yaml
    ref: main
    refresh: 0s

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

# Enable logging
logger:

ota:
  password: "xxx"

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

  manual_ip:
    static_ip: 10.7.0.15
    gateway: 10.7.0.1
    subnet: 255.255.255.0
    dns1: 10.2.0.254
  
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Assist-1 Fallback Hotspot"
    password: "xxx"

captive_portal:

improv_serial:

i2s_audio:
  i2s_lrclk_pin: GPIO33
  i2s_bclk_pin: GPIO19

microphone:
  - platform: i2s_audio
    id: echo_microphone
    i2s_din_pin: GPIO23
#    adc_type: external
#    pdm: false

media_player:
  - platform: i2s_audio
    name: None
    id: echo_audio
    dac_type: external
    i2s_dout_pin: GPIO22
    mode: mono

voice_assistant:
    url: https://github.com/esphome/firmware
    file: voice-assistant/m5stack-atom-echo.yaml
    ref: main
    refresh: 0s

  microphone: echo_microphone
  on_start:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
  on_tts_start:
    - light.turn_on:
        id: led
        blue: 0%
        red: 0%
        green: 100%
  on_tts_end:
    - light.turn_on:
        id: led
        blue: 0%
        red: 0%
        green: 100%
    - media_player.play_media: !lambda return x;
  on_end:
    - delay: 1s
    - if:
        condition:
            media_player.is_playing:
        then:
          - wait_until:
              media_player.is_idle:
          - light.turn_off: led
        else:
          - light.turn_off: led
  on_error:
    - light.turn_on:
        id: led
        blue: 0%
        red: 100%
        green: 0%
    - delay: 1s
    - light.turn_off: led

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
    name: Button
    disabled_by_default: true
    entity_category: diagnostic
    id: echo_button
    on_press:
      - voice_assistant.start:
    on_release:
      - voice_assistant.stop:

light:
  - platform: neopixelbus
    id: led
    name: ${friendly_name}
    pin: GPIO27
    variant: SK6812
    num_leds: 1
    type: grb
1 Like

I don’t know what you mean by “original one”, but it is not the one on github.

In any event your indentation is clearly wrong. Look under your voice_assistant: line.

1 Like

oh yeah just saw the double entry… somehow i have mixed up a few things here :slight_smile:

Its based on the orginal one and i have only changed a few things, it was working afterwards as i could use the device as expected. But i might have done things wrong afterwards :slight_smile:

Thanks for your help so far!

You talk nonsense. Stop it. I already said, no one knows what you mean by “original one” no one knows why you have “changed a few things” or what those things were. I didn’t refer to “the double entry”. I referred to obviously incorrect indentation.

1 Like

Well i never asked you personally to answer here!! And who are you to tell me what to do or not to ? :laughing:

Sometimes I wonder why I try to help here.

4 Likes

Nevermind - i appreciated your help a few times in this thread already… i guess i said thank you as well :slight_smile:
But there is no need to tell me to “stop talking nonsense” (that rude) as it was not. That´s it :slight_smile:

I thought this was required reading. Clearly not everyone does.

1 Like

Not the point i was talking about but as i said nevermind… :handshake:

Anyone know why this page has disappeared?

https://www.home-assistant.io/projects/thirteen-usd-voice-remote/

1 Like

Maybe just temporary…

Ok it seems to be here instead: $13 voice remote for Home Assistant - Home Assistant

1 Like

LOL, I only just realized that there are two of these YAML files from ESPHome for the M5Stack Atom Echo devices:

I really like the idea of being able to send media to these things so I’ve been trying to get them to work…

The Voice Assistant One seems to work pretty well, all as described:

  1. click the button, light turns blue
  2. start speaking and the blue light flashes indicating that it’s listening to you
  3. stop talking and HA processes the result
  4. HA executes the command if it understood what you said and the light turns green
  5. HA sends back the TTS result and the Atom Echo says it! SUCCESS

The Media Player One doesn’t seem to work as well for me. It uses a pretty customized on_multi_click under the hood instead of a on_click.

  1. push the button in, light stays off
  2. start speaking and the light turns blue
  3. stop speaking and let the button go, light stays on for a second or two
  4. light turns red
  5. HA executes the command if it understood
  6. light turns green
  7. light turns off

There’s no feedback audio, though in the serial logs I can see that it attempted to send one back. The weird thing is that I can use the media player to send TTS from Google or Piper to the little Atom Echo and it works just fine as a “one-off” but when it’s in this process pipeline it doesn’t work:

[08:12:25][D][binary_sensor:036]: 'Button': Sending state ON
[08:12:26][D][voice_assistant:132]: Requesting start...
[08:12:26][D][voice_assistant:111]: Starting...
[08:12:26][D][voice_assistant:154]: Assist Pipeline running
[08:12:26][D][light:036]: 'None' Setting:
[08:12:26][D][light:047]:   State: ON
[08:12:26][D][light:059]:   Red: 0%, Green: 0%, Blue: 100%
[08:12:27][D][binary_sensor:036]: 'Button': Sending state OFF
[08:12:27][D][voice_assistant:144]: Signaling stop...
[08:12:29][E][voice_assistant:231]: Error: speech-timeout - No speech detected
[08:12:29][D][voice_assistant:144]: Signaling stop...
[08:12:29][D][light:036]: 'None' Setting:
[08:12:29][D][light:059]:   Red: 100%, Green: 0%, Blue: 0%
[08:12:30][D][voice_assistant:168]: Speech recognised as: " office light on."
[08:12:30][D][voice_assistant:144]: Signaling stop...
[08:12:30][D][voice_assistant:192]: Response: "Turned on light"
[08:12:30][D][light:036]: 'None' Setting:
[08:12:30][D][light:059]:   Red: 0%, Green: 100%, Blue: 0%
[08:12:30][D][voice_assistant:207]: Response URL: "http://redacted/api/tts_proxy/c9423eae01959b2af87c0b8d21f861b36e9b0fec_en-us_8f9b84fea8_tts.piper.raw"
[08:12:30][D][media_player:059]: 'None' - Setting
[08:12:30][D][media_player:066]:   Media URL: http://redacted/api/tts_proxy/c9423eae01959b2af87c0b8d21f861b36e9b0fec_en-us_8f9b84fea8_tts.piper.raw
[08:12:30][D][light:036]: 'None' Setting:
[08:12:30][D][light:059]:   Red: 0%, Green: 100%, Blue: 0%
[08:12:30][D][light:109]:   Effect: 'Pulse'
[08:12:30][W][component:204]: Component api took a long time for an operation (0.05 s).
[08:12:30][W][component:205]: Components should block for at most 20-30ms.
[08:12:31][W][component:204]: Component i2s_audio.media_player took a long time for an operation (0.55 s).
[08:12:31][W][component:205]: Components should block for at most 20-30ms.
[08:12:31][D][light:036]: 'None' Setting:
[08:12:31][D][light:047]:   State: OFF
[08:12:31][D][light:109]:   Effect: 'None'
[08:12:31][D][voice_assistant:218]: Assist Pipeline ended
[08:12:31][W][component:204]: Component i2s_audio.media_player took a long time for an operation (0.45 s).
[08:12:31][W][component:205]: Components should block for at most 20-30ms.
[08:12:32][D][light:036]: 'None' Setting:
[08:12:38][D][sensor:094]: 'Echo1 Uptime Raw': Sending state 324.20999 s with 0 decimals of accuracy

In the log it says “No speech detected” but I spoke pretty quickly after pressing the button, and clearly it recognized what I said because it turned on the office light.

I was reading the ESPHome page for Voice Assistant (Voice Assistant — ESPHome) and I see it suggests options for both “Push to Talk” (momentary) and “Click to Converse” (toggle) using on_press/on_release and on_click, respectively. I see why the media_player one uses on_multi_click but I might try to use the suggested thing from ESPHome and forego the single click to play/pause and see if that helps…

Anyone have any other ideas?

3 Likes