Is it possible to have the assist respond from a different media player?

I have the M5Atom up and running and it is great, however the speaker leaves everything to be desired. As a proof of concept though, it’s super helpful.

What I’m wondering is, is there a way to reroute the tts from piper to another media device (someday I would love to link a specific media player (sonos in a room) to a specific m5atom / microphone).

From what I’ve read and played around with we can do this with a specific automation via the sentence trigger, with a predefined tts output, but I am thinking more of the dynamic responses like “turning on the lights” or whatever OpenAI responds with.

Have I missed where this is possible right now or is it something on the roadmap?

2 Likes

Try reading through this. Near the bottom, you’ll see it’s possible to add some lines to your ESP config, where a mic can be linked to a particular media player for responses.

Got this from the helpful lot over on Discord:-)

1 Like

I’m looking for a similar solution. I have built a few Wyoming Protocol satellite devices but only want to use them for the mic - then tie them specifically to Sonos speakers in the room where the satellite exists. So, taking the voice command from the Satellite and then redirecting the response to Sonos. I have added ChatGPT to the mix and really like the results. I’ve seen a few posts where it has been accomplished using Node-Red, but I cannot find the details on the how.

It would be nice if it was native in the Voice Assistant setup in Home Assistant.

6 Likes

looking for this same capabillity

Check my solution:

With esphome satellite’s it is quite easy, add the following:

voice_assistant:
  on_listening:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        brightness: 100%
        effect: pulse
  on_tts_start:
    - speaker.stop:
        id: echo_speaker
    - light.turn_on:
        id: led
        blue: 0%
        red: 0%
        green: 100%
        brightness: 100%
        effect: pulse
    - homeassistant.service:
        service: tts.cloud_say
        data:
          entity_id: media_player.CHOSEN_MEDIA_PLAYER_ENTITY
        data_template:
          message: "{{ my_stt }}"
        variables:
          my_stt: return x;

you need to change your ‘on_tts_start’ actions.

4 Likes

Looking for the same solution. I also think it would be much better to select an output speaker from the voice assistant config screen.

2 Likes

thanks - but I am unable to figure out where to add these lines. I have the atom configured, and likewise a few media players. tts is also working fine… I am missing the link :slight_smile:

I can tell you this. If the device you are using is not exposing itself as a mediaplayer, you will run out of luck to get this done.
I am using an rpiz2w with mic2hat. It exposes all kind of entities, but not media.player. So you cannot send tts to the satellite. It’s a bummer, because everything else is working like I want it to.

The code above is to replace lines in the YAML running on the Atom Echo. You need to compile new code for the Atom (using something like ESPHome Device Builder) with those lines changed then reprogram the Atom Echo with ESPHome. I just got it working for myself.