Year of the Voice - Chapter 5

You can already do that, but you lose the ready-made-config experience. Here are the steps:

  • install ESPHome as an addon or separate container
  • get a VA config for your board from here or write your own
  • replace speaker with media_player in the voice_assistant configuration
  • use this for voice_assistant.on_tts_end
voice_assistant:
  on_tts_end:
     - homeassistant.service:
         service: media_player.play_media
         data:
           entity_id: media_player.your_desired_speaker # <- change this
           media_content_id: !lambda 'return x;'
           media_content_type: music
           announce: "true"
  • flash the config to your board
  • go to HA, import the new device via the ESPHome integration if not already there
  • in Integrations > ESPHome > click Configure next to your device and allow it to make HA service calls

Now when you use the ESP device as a microphone, the output will be routed to the media_player of your choice

9 Likes