Voica Assistant : M5 Atom Echo - using Google Home Speaker for TTS

I’m playing with M5 Atom Echo, with Vocie Assistant and with Nabu Casa cloud and it looks to work fine.
When I speak a command, I quickly get the response on the tiny speaker inside M5 Atom Echo.
I was wondering: Is there any possibility to receive the response of the command on another speaker? like Google Home speaker?
Example:
I press the M5 Atom Echo button, I speak the command. Then I see the green led light on M5 Atom Echo and then I hear the response voice on Google Home (but the response voice from Nabu Casa TTS, not the google TTS) . Is this posisble ?

Analyzing if this: ESPHome Voice Assistant speech output to Home Assistant Media Player could be a solution to my topic …

Did you figure this out? I’d like to do the same thing but with Amazon Echo devices as the speaker.

1 Like

Hello. Been searching also and i’ve managed to do it 2 ways. One is transforming sending the wav to the Alexa Media integration in wav. I clean the URL which is bad in the code (i have to figure out how to do this another way as it will be overwritten after the next update), encode it in mp3 and then send it to the Amazon Echo Dot API with TTS and annouce set to true. So there’s a bit of latency to encode and all but on the other hand you can choose the voice you want etc. Then i found way to send the text via the notify service which uses the API also so that it is spoken by Echo Dot voice motor.

Here are the 2 videos i’ve made about it

and check on my channel to see the last one for the “notifty” way as i can’t put more embed links as a new user

For the first method, put this in your yaml file and upload to the Atom Echo

Just after “on_tts_start” section

 on_tts_end:
    - homeassistant.service:
        service: media_player.play_media
        data:
          entity_id: edia_player.echo_dot_guillaume
          media_content_id: !lambda 'return x;'
          media_content_type: music
          annouce: "true"

this is the code i have in the file

I’ll let you compare with the original one

You can check the differences i made with the original file here (Ignore Trim White Space)

As for the Notify method https://youtu.be/dBSQlRt8_N4. I directly hardcoded the call to the notify service inside the “Open AI Extended Conversation” component code files so that it sends the notify directly after the response from the request but maybe it’s possible to directly do it in the .yaml of the Atom Echo with something like this ? I’ll try later.

  on_tts_start:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        brightness: 100%
        effect: none
  on_tts_end:
    - homeassistant.service:
        service: notify.alexa_media_echo_dot_guillaume
        data:
          message: !lambda 'return x;'
          data:
            type: announce

there are so many different threads and attempts at this… Makes me wonder why the esphome folks haven’t made it more simple… I’ve hacked away at it but get it working and break something else.

https://community.home-assistant.io/t/esphome-voice-assistant-speech-output-to-home-assistant-media-player/588337/14

I have a simple config which just extends the defualt firmware

substitutions:
  name: m5stack-atom-echo-b836b0
  friendly_name: M5Stack Atom Echo b836b0
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: +someapikey=


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

# 2024-07-10 Until https://github.com/esphome/firmware/pull/233 is fixed/merged
update:
  - platform: http_request
    id: !remove update_http_request

# HarsG's customisations
speaker:
  - platform: i2s_audio
    id: !extend echo_speaker
    i2s_dout_pin: GPIO21 # <- It is actually on 22, so this disables the speaker
    dac_type: external
    mode: mono

voice_assistant:
  on_tts_end:
     - homeassistant.service:
         service: media_player.play_media
         data:
           entity_id: media_player.study_speaker # <- this is hard-coded
           media_content_id: !lambda 'return x;'
           media_content_type: music
           announce: "true"    

Although I’m trying and failing to get timers to work.: How to override an action in a package

Thanks to the post: ESPHome Voice Assistant speech output to Home Assistant Media Player - #21 by thewebmachine
I have been able to eliminate the internal speaker.

My customization of the code does not contain the speaker section, only the voice_assistant variant of the one listed above:

voice_assistant:
  noise_suppression_level: 4     # increase noise suppression to 3 -or- 4 from default 2 for better sound floor suppression
  volume_multiplier: 5.0     # increase multiplier from 2.0 to 5.0 to give the mic a little boost...going above 5.0 with Atom Echo resulted in distorted audio for me
  speaker: !remove     # remove the default 'echo_speaker' entry so VA doesn't use internal speaker at all. NOTE: THIS ALSO DISABLES SOUND FOR TIMERS but LED will still flash on finish
  on_tts_end:
     - homeassistant.service:
         service: media_player.play_media
         data:
           entity_id: media_player.name_of_a_player # <- this to be changed to actual media_player
           media_content_id: !lambda 'return x;'
           media_content_type: music
           announce: "false"

Hope it helps.