#How can I change Piper TTS volume in an automation?

1 messages · Page 1 of 1 (latest)

glacial shoal
#

Hi, I want to create a simple automation to tell me the time. However, the voice is too loud. The automation using media_player is like this:
alias: Hlas - kolik je hodin
description: Řekne čas
triggers:

  • command:
    • kolik je hodin
    • čas
      trigger: conversation
      actions:
  • service: media_player.volume_set
    data:
    entity_id:
    - media_player.vlc_telnet
    volume_level: 1
  • action: tts.speak
    metadata: {}
    data:
    cache: true
    media_player_entity_id: media_player.vlc_telnet
    message: "{{ now().strftime('%H:%M') }}"
    target:
    entity_id: tts.piper
    mode: single

The volume is not changed, however if I set volume_level to anything other than 1, only a complete message is spoken.

Another approach using platform.set_conversation_response also does not work as expected:
actions:

  • set_conversation_response: "{{ now().strftime('%H:%M') }}"

It respects Piper volume and avoids the annoying complete message, but only works in half the cases. To be specific, it only works the second time the trigger phrase is spoken.

Is there a working way to do it?

misty vale
#

actions:

  • action: media_player.volume_set
    metadata: {}
    target:
    device_id: 5ee58c347fd86dda99e9d12179b1cd7e
    data:
    volume_level: 0.8