Talk to your HA Voice Assistant via Siri

Hey everyone!

I’m excited to share with you a shortcut that combines voice dictation, API responses, Ollama if you’re using an LLM (any conversation agent really!) and Text-to-Speech (TTS) playback using Piper and Siri. This solution can be used on HomePods, making it a great alternative to building or buying another open-source smart speaker.

How it Works

  1. Say “Hey Siri” followed by the shortcut name.
  2. Siri will prompt you, and you’ll say what you want to your Home Assistant (HA) assistant or issue commands.
  3. The shortcut will play back your HA voice assistant reply with your TTS settings (piper).

Pre-Requisites and Configurations

Before testing this shortcut, make sure to update the variable input values at the top:

  1. HAURL: Enter your full URL for your Home Assistant server, including the port (e.g., http(s)://homeassistant_IP:port).
  2. PiperVoice: Get the voice you want to use for TTS from the Piper Addon page on your HA instance. Look for something like en_US-arctic-medium.onnx.json and remove the .onnx.json part.
  3. Token: Create a long-lived access token to access the API by going to your account name > Security > scrolling all the way to the bottom.
  4. ConvAgent: Find the agent you need (e.g., Basic Home Assistant Agent or Ollama for LLM) and copy whatever is after “conversation.” from your entities.
  5. URLPort: Important! Set this variable to whatever value (anything) if your Home Assistant is behind a reverse proxy/uses SSL AND the default port is blocked on your LAN.

Get the Shortcut

Head over to this link: Shortcuts

Once you add it, edit it, and update these variables to test this shortcut!

Conclusion

I hope this becomes something useful and is built upon by our community. With this shortcut, we can still use our HomeKit devices and HomePods with the HA voice assistant integration.

Thanks for giving me so much to be thankful for!

3 Likes

Update:

  • Used static conversation_id to retain context and conversation history

Shortcut

Thank you - works fine!

1 Like

Update:
So seems like homepods don’t work very well with play audio shortcuts. Will work well with phones and macs but excuting this shortcut from a homepod will play still the audio on your phone. I came up with a workaround that works like this:

  1. You set an automation on Home Assistant side (linked below)
  2. You set a variable for the homepod media player entity id from home assistant (whats after media_player. ) on the updated shortcut variable “speaker” (linked below)
  3. When you call the shortcut from homepod, it will use webhooks to let HA play the audio response on the HomePod.

Obviously, if you have multiple HomePods. You will have to duplicate the shortcut and name them accordenly, eg: kitchen assist, bedroom assist. etc… Which I know, IT SUCKS! but i cannot figure out a way around it. If you do please let me know!

HA Automation:

alias: Assistant Voice Playback
trigger:
  - platform: webhook
    webhook_id: assistant_voice_playback
action:
  - service: media_player.play_media
    data:
      entity_id: "{{ trigger.json.target_speaker }}"
      media_content_id: "{{ trigger.json.audio_url }}"
      media_content_type: "music"
mode: single

Updated Shortcut: HomePod Shortcut

1 Like