I have a Siri shortcut on my iPhone which calls a script that announces the location of my dog where ever he is in the house. (I use espresense for room presence detection). The shortcut works, but there is as much as 30 seconds from time I say: “Where is spot”, until hear the reply. I tried the default voice assistant, but then I installed Piper/Whisper and set that as my default VA. The performance in either case, the response is very slow in coming. Here is the script:
alias: Find Fawkes
sequence:
- if:
- condition: numeric_state
entity_id: media_player.living_room_homepod_2
below: 0.65
attribute: volume_level
then:
- service: input_number.set_value
data:
value: >-
{{ state_attr('media_player.living_room_homepod_2', 'volume_level')
| float }}
target:
entity_id: input_number.homepod_volume
- service: media_player.volume_set
data:
volume_level: 0.7
target:
entity_id: media_player.living_room_homepod_2
- service: tts.google_translate_say
data:
cache: true
entity_id: media_player.living_room_homepod_2
message: "{{states('sensor.formatted_fawkes_location')}}"
- service: media_player.volume_set
data:
volume_level: "{{ states('input_number.homepod_volume') | float }}"
target:
entity_id: media_player.living_room_homepod_2
mode: single
The sensor, sensor.formatted_fawkes_location returns an expression like this:
Fawkes is in the bedroom
Any tips on performance? It seems the other TTS type do not accept templates.
Thanks