Chime TTS - Play audio before/after TTS audio lag free

Hi @KrisHoobie. Sorry to hear youโ€™re having this issue.

Chime TTS sets the volume level for Sonos speakers in the same way via the extra.volume parameter regardless of whether announce is set to true or false.

Can you please share with me a YAML example of how you successfully call the media_player.play_media service for your Sonos speaker, where you apply the volume?

Hi,

When not using ChimeTTS but using all my Sonos speakers for my alarm Iโ€™m using the following code and this works just fine

  - service: media_player.volume_set
    data_template:
      entity_id:
      - media_player.draagbaar
      - media_player.sonoskeuken
      - media_player.badkamer
      - media_player.studeerkamer
      - media_player.woonkamer_2
      volume_level: '{{ states("input_number.defaultVolumeAlarm") }}'

However when using ChimeTTS the volume is not changing when using the following code

    tap_action:
      action: call-service
      service: chime_tts.say
      target:
        entity_id:
          - media_player.sonoskeuken
          - media_player.draagbaar
      data:
        end_chime_path: tada
        message: dit is een volume test
        chime_path: ba_dum_tss
        tts_platform: cloud
        join_players: true
        unjoin_players: true
        volume_level: 0.34

I played around with another number for the volume_level but nothing changes. However, I read somewhere in this thread that other people also having this problem and they said that when adding announce: true to this piece of code the volume_level is taking into account and indeed when doing that the volume is set. But I donโ€™t want to use announce as it must be completely silent when the message is send.

Please let me know if you need more info.

Cheers
Kris

Hey @Nimrod_Dolev! Hope all is well with you and yours!

Iโ€™m having problems with the new v1.1.4-beta 4. When I run an automation, I get that stupid โ€œSorry, Iโ€™m having trouble accessing your Simon Says NA skill right nowโ€ error.

My devices beep which means chime_tts works for volume change but I donโ€™t think it restores back to the intial volume. (This isnโ€™t what I need help with but thought Iโ€™d mention it)

I didnโ€™t make any changes. I only upgraded to the beta 4 from the v1.1.4-beta 3 and it started saying that error.

When I downgrade to v1.1.4-beta 3, Iโ€™m able to run the automation and do not get that error.

Here are my logs, hoping you might see what might be causing the error. I have redacted my personal nabu casa part of the URL being used.

EDIT: Below is v1.1.4-beta4 logs:

2024-07-17 17:14:27.882 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-07-17 17:14:27.882 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say Called. Version v1.1.4-beta4 โ•‘
2024-07-17 17:14:27.882 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-07-17 17:14:27.882 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-07-17 17:14:27.892 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-17 17:14:27.892 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-07-17 17:14:27.892 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-17 17:14:27.892 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * entity_ids:
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 0: media_player.couch_echo_left_amz
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 1: media_player.colton_s_echo_show
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 2: media_player.bedroom_echo_right_amz
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * chime_path = https://<redacted>.ui.nabu.casa/local/mp3/ooh-that-feels-good.mp3
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * cache = False
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * offset = 450.0
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * final_delay = 0.0
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_platform = openai_tts
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_speed = 100.0
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_pitch = 0
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * announce = True
2024-07-17 17:14:27.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * fade_audio = False
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * volume_level = 0.35
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * join_players = True
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * unjoin_players = True
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * audio_conversion = -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * media_players_array:
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 0: entity_id: media_player.couch_echo_left_amz
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      platform: alexa_media
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      initial volume: -1.0
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      target volume: 0.35
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      now playing: False
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      join supported: False
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      announce supported: False
2024-07-17 17:14:27.894 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 1: entity_id: media_player.colton_s_echo_show
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      platform: alexa_media
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      initial volume: -1.0
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      target volume: 0.35
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      now playing: False
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      join supported: False
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      announce supported: False
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 2: entity_id: media_player.bedroom_echo_right_amz
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      platform: alexa_media
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      initial volume: -1.0
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      target volume: 0.35
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      now playing: False
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      join supported: False
2024-07-17 17:14:27.895 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      announce supported: False
2024-07-17 17:14:27.896 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-17 17:14:27.896 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-07-17 17:14:27.896 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-17 17:14:27.900 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Downloading chime at URL: https://<redacted>.ui.nabu.casa/local/mp3/ooh-that-feels-good.mp3
2024-07-17 17:14:29.536 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Audio downloaded successfully
2024-07-17 17:14:29.684 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/chimes/<redacted>.ui.nabu.casa_local_mp3_ooh-that-feels-good.mp3
2024-07-17 17:14:29.684 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Chime downloaded successfully
2024-07-17 17:14:29.684 DEBUG (MainThread) [custom_components.chime_tts]  - Retrieving audio from path: "/media/sounds/temp/chime_tts/chimes/<redacted>.ui.nabu.casa_local_mp3_ooh-that-feels-good.mp3"...
2024-07-17 17:14:29.770 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Deleting file /media/sounds/temp/chime_tts/chimes/<redacted>.ui.nabu.casa_local_mp3_ooh-that-feels-good.mp3
2024-07-17 17:14:29.770 DEBUG (MainThread) [custom_components.chime_tts]    ...audio retrieved. Duration: 1.999s
2024-07-17 17:14:29.770 DEBUG (MainThread) [custom_components.chime_tts]  - Saving mp3 file to public folder: /config/www/chime_tts/...
2024-07-17 17:14:29.833 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/chime_tts/n2ed7ii0.mp3
2024-07-17 17:14:29.833 DEBUG (MainThread) [custom_components.chime_tts]   - Performing FFmpeg audio conversion...
2024-07-17 17:14:29.834 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Running FFMpeg operation: "ffmpeg -i /config/www/chime_tts/n2ed7ii0.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /config/www/chime_tts/n2ed7ii0_converted.mp3"
2024-07-17 17:14:29.890 DEBUG (MainThread) [custom_components.chime_tts]     ...FFmpeg audio conversion completed.
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts]  - Chime TTS audio generated:
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts]    * audio_duration = 2.064
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts]    * local_path = None
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts]    * public_path = "https://<redacted>.ui.nabu.casa//local/chime_tts/n2ed7ii0.mp3"
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts]    * media_content_id = None
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Pre-Playback Actions โ”‚
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.couch_echo_left_amz's volume from -1.0 to 0.35
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - Setting media_player.couch_echo_left_amz's volume to 0.35
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.colton_s_echo_show's volume from -1.0 to 0.35
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - Setting media_player.colton_s_echo_show's volume to 0.35
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.bedroom_echo_right_amz's volume from -1.0 to 0.35
2024-07-17 17:14:29.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - Setting media_player.bedroom_echo_right_amz's volume to 0.35
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - โœ”๏ธ media_player.couch_echo_left_amz's volume now -1.0
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - โœ”๏ธ media_player.colton_s_echo_show's volume now -1.0
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - โœ”๏ธ media_player.bedroom_echo_right_amz's volume now -1.0
2024-07-17 17:14:29.978 WARNING (MainThread) [custom_components.chime_tts.helpers.media_player_helper] No media_players were found that support joining speakers into a group. A minimum of 2 is requied.
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Chime TTS playback โ”‚
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts]    3 Alexa media players detected:
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts]      - media_player.couch_echo_left_amz
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts]      - media_player.colton_s_echo_show
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts]      - media_player.bedroom_echo_right_amz
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts]    Calling notify.alexa_media with data:
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts]      - message: <audio src="https://<redacted>.ui.nabu.casa//local/chime_tts/n2ed7ii0.mp3"/>
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts]      - data: {'type': 'tts'}
2024-07-17 17:14:29.978 DEBUG (MainThread) [custom_components.chime_tts]      - target: ['media_player.couch_echo_left_amz', 'media_player.colton_s_echo_show', 'media_player.bedroom_echo_right_amz']
2024-07-17 17:14:29.979 DEBUG (MainThread) [custom_components.chime_tts]  - Waiting 2.064s for audio playback to complete...
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - Waiting until 3 media_players aren't playing...
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]    โœ” media_player.couch_echo_left_amz
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]    โœ” media_player.colton_s_echo_show
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]    โœ” media_player.bedroom_echo_right_amz
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Post-Playback Actions โ”‚
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Initial volume for media_player.couch_echo_left_amz is unknown. Unable to restore volume.
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Initial volume for media_player.colton_s_echo_show is unknown. Unable to restore volume.
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Initial volume for media_player.bedroom_echo_right_amz is unknown. Unable to restore volume.
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts] Removing temporary file:
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Deleting file /config/www/chime_tts/n2ed7ii0.mp3
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚โ”€โ”€โ”€โ”€ Chime TTS Say Completed in 4.16 s โ”€โ”€โ”€โ”€โ”‚
2024-07-17 17:14:32.044 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-17 17:14:32.045 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Service call completed successfully
2024-07-17 17:14:32.045 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Queue now empty

Here are the v1.1.4-beta3 logs for comparison:

2024-07-17 17:29:21.610 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.4-beta3 -----
2024-07-17 17:29:21.610 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-07-17 17:29:21.715 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-07-17 17:29:21.715 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * entity_ids:
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 0: media_player.bedroom_echo_right_amz
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 1: media_player.colton_s_echo_show
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 2: media_player.couch_echo_left_amz
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * chime_path = https://<redacted>.ui.nabu.casa/local/mp3/ooh-that-feels-good.mp3
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * cache = False
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * offset = 450.0
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * final_delay = 0.0
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_platform = openai_tts
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_speed = 100.0
2024-07-17 17:29:21.716 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_pitch = 0
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * announce = True
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * fade_audio = False
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * volume_level = 0.35
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * join_players = True
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * unjoin_players = True
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * audio_conversion = -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * media_players_array:
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 0: entity_id: media_player.bedroom_echo_right_amz
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      platform: alexa_media
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      initial volume: -1.0
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      target volume: 0.35
2024-07-17 17:29:21.717 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      now playing: False
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      join supported: False
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      announce supported: False
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 1: entity_id: media_player.colton_s_echo_show
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      platform: alexa_media
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      initial volume: -1.0
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      target volume: 0.35
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      now playing: False
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      join supported: False
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      announce supported: False
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 2: entity_id: media_player.couch_echo_left_amz
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      platform: alexa_media
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      initial volume: -1.0
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      target volume: 0.35
2024-07-17 17:29:21.718 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      now playing: False
2024-07-17 17:29:21.719 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      join supported: False
2024-07-17 17:29:21.719 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      announce supported: False
2024-07-17 17:29:21.719 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Downloading chime at URL: https://<redacted>.ui.nabu.casa/local/mp3/ooh-that-feels-good.mp3
2024-07-17 17:29:22.222 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Audio downloaded successfully
2024-07-17 17:29:22.387 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/chimes/<redacted>.ui.nabu.casa_local_mp3_ooh-that-feels-good.mp3
2024-07-17 17:29:22.387 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Chime downloaded successfully
2024-07-17 17:29:22.388 DEBUG (MainThread) [custom_components.chime_tts]  - Retrieving audio from path: "/media/sounds/temp/chime_tts/chimes/<redacted>.ui.nabu.casa_local_mp3_ooh-that-feels-good.mp3"...
2024-07-17 17:29:22.476 DEBUG (MainThread) [custom_components.chime_tts]    ...audio retrieved. Duration: 1.999s
2024-07-17 17:29:22.477 DEBUG (MainThread) [custom_components.chime_tts]  - Saving mp3 file to public folder: /config/www/chime_tts/...
2024-07-17 17:29:22.541 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/chime_tts/cdfnq06z.mp3
2024-07-17 17:29:22.541 DEBUG (MainThread) [custom_components.chime_tts]   - Performing FFmpeg audio conversion...
2024-07-17 17:29:22.542 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Converting audio: "ffmpeg -i /config/www/chime_tts/cdfnq06z.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /config/www/chime_tts/cdfnq06z_converted.mp3"
2024-07-17 17:29:22.602 DEBUG (MainThread) [custom_components.chime_tts]     ...FFmpeg audio conversion completed.
2024-07-17 17:29:22.697 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to walk with args ('/config/www',) inside the event loop by custom integration 'chime_tts' at custom_components/chime_tts/helpers/filesystem.py, line 279: for root, _, files in os.walk(directory): (offender: /config/custom_components/chime_tts/helpers/filesystem.py, line 279: for root, _, files in os.walk(directory):), please create a bug report at https://github.com/nimroddolev/chime_tts/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#walk
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/config/custom_components/chime_tts/queue_manager.py", line 38, in async_process_queue
    result = await asyncio.wait_for(
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
  File "/config/custom_components/chime_tts/__init__.py", line 182, in async_say_execute
    return await async_prepare_media(hass, params, options, media_players_array, is_say_url, start_time)
  File "/config/custom_components/chime_tts/__init__.py", line 289, in async_prepare_media
    audio_dict = await async_get_playback_audio_path(params, options)
  File "/config/custom_components/chime_tts/__init__.py", line 792, in async_get_playback_audio_path
    audio_dict[PUBLIC_PATH_KEY] = filesystem_helper.get_external_url(hass, audio_dict.get(PUBLIC_PATH_KEY, None))
  File "/config/custom_components/chime_tts/helpers/filesystem.py", line 296, in get_external_url
    if self.file_exists_in_directory(file_path, public_dir) is False:
  File "/config/custom_components/chime_tts/helpers/filesystem.py", line 279, in file_exists_in_directory
    for root, _, files in os.walk(directory):

2024-07-17 17:29:22.701 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to scandir with args ('/config/www',) inside the event loop by custom integration 'chime_tts' at custom_components/chime_tts/helpers/filesystem.py, line 279: for root, _, files in os.walk(directory): (offender: <frozen os>, line 366: ?), please create a bug report at https://github.com/nimroddolev/chime_tts/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#scandir
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/config/custom_components/chime_tts/queue_manager.py", line 38, in async_process_queue
    result = await asyncio.wait_for(
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
  File "/config/custom_components/chime_tts/__init__.py", line 182, in async_say_execute
    return await async_prepare_media(hass, params, options, media_players_array, is_say_url, start_time)
  File "/config/custom_components/chime_tts/__init__.py", line 289, in async_prepare_media
    audio_dict = await async_get_playback_audio_path(params, options)
  File "/config/custom_components/chime_tts/__init__.py", line 792, in async_get_playback_audio_path
    audio_dict[PUBLIC_PATH_KEY] = filesystem_helper.get_external_url(hass, audio_dict.get(PUBLIC_PATH_KEY, None))
  File "/config/custom_components/chime_tts/helpers/filesystem.py", line 296, in get_external_url
    if self.file_exists_in_directory(file_path, public_dir) is False:
  File "/config/custom_components/chime_tts/helpers/filesystem.py", line 279, in file_exists_in_directory
    for root, _, files in os.walk(directory):

2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts]  - Chime TTS audio generated:
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts]    * audio_duration = 2.064
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts]    * local_path = None
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts]    * public_path = "https://<redacted>.ui.nabu.casa//local/chime_tts/cdfnq06z.mp3"
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts]    * media_content_id = None
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.bedroom_echo_right_amz's volume from -1.0 to 0.35
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - Setting media_player.bedroom_echo_right_amz's volume to 0.35
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.colton_s_echo_show's volume from -1.0 to 0.35
2024-07-17 17:29:22.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - Setting media_player.colton_s_echo_show's volume to 0.35
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.couch_echo_left_amz's volume from -1.0 to 0.35
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - Setting media_player.couch_echo_left_amz's volume to 0.35
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - โœ”๏ธ media_player.bedroom_echo_right_amz's volume now -1.0
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - โœ”๏ธ media_player.colton_s_echo_show's volume now -1.0
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - โœ”๏ธ media_player.couch_echo_left_amz's volume now -1.0
2024-07-17 17:29:22.874 WARNING (MainThread) [custom_components.chime_tts.helpers.media_player_helper] No media_players were found that support joining speakers into a group. A minimum of 2 is requied.
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts]    3 Alexa media players detected:
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts]      - media_player.bedroom_echo_right_amz
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts]      - media_player.colton_s_echo_show
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts]      - media_player.couch_echo_left_amz
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts]    Calling notify.alexa_media with data:
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts]      - message: <audio src="https://<redacted>.ui.nabu.casa//local/chime_tts/cdfnq06z.mp3"/>
2024-07-17 17:29:22.874 DEBUG (MainThread) [custom_components.chime_tts]      - data: {'type': 'tts'}
2024-07-17 17:29:22.875 DEBUG (MainThread) [custom_components.chime_tts]      - target: ['media_player.bedroom_echo_right_amz', 'media_player.colton_s_echo_show', 'media_player.couch_echo_left_amz']
2024-07-17 17:29:22.875 DEBUG (MainThread) [custom_components.chime_tts]  - Waiting 2.064s for audio playback to complete...
2024-07-17 17:29:24.941 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]  - Waiting until 3 media_players aren't playing...
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]    โœ” media_player.bedroom_echo_right_amz
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]    โœ” media_player.colton_s_echo_show
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper]    โœ” media_player.couch_echo_left_amz
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts] *****************************
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts] *** Post-Playback Actions ***
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts] *****************************
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Initial volume for media_player.bedroom_echo_right_amz is unknown. Unable to restore volume.
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Initial volume for media_player.colton_s_echo_show is unknown. Unable to restore volume.
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Initial volume for media_player.couch_echo_left_amz is unknown. Unable to restore volume.
2024-07-17 17:29:24.942 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 3.23 s -----

Hey @Nimrod_Dolev!

First of all thanks a lot for this integration. Itโ€™s really nice and handy.

My question is the following: I tried to put the following to both chime: and chime_path: parameters:

media-source://media_source/media/Announcements/Chimes/Seatbelts Double.wav

However, none worked. Is it actually possible to put it this way?

Hey @Nimrod_Dolev ,

I might be opening a can of worms here but I was at my friends place who uses Spotify. We installed Chime TTS and set up an automation to play on one of his speakers. He was listening to Spotify on all his speakers, and when Chime TTS automation ran, it stopped the music on ALL his speakers, played the chime on the specific speaker chosen in the automation, but then did not resume the music again on any of the speakers.

Is Chime TTS only to stop Spotify on the specific designated speaker in the automation or is the expected outcome for it to stop Spotify on all speakers, in order to run itโ€™s automation?

Sorry if this is a silly question. I donโ€™t have Spotify so I am not able to troubleshoot this easily. I can work with my friend for the logs if you need them, but this was really just a question on the expected behaviour of Chime TTS. :slight_smile:

@Nimrod_Dolev I have been getting โ€œlog in attempt failedโ€ notifications in HA tied to Chime TTS. This happens repeatedly every couple of hours. Below are the logs. Iโ€™m running v.1.1.4-beta4 on 2024.7.3. What could be causing this, and is there a fix?

Logger: homeassistant.components.http.ban
Source: components/http/ban.py:135
integration: HTTP (documentation, issues)
First occurred: July 19, 2024 at 3:50:47 PM (17 occurrences)
Last logged: 12:30:23 PM

Login attempt or request with invalid authentication from pool-74-96-37-218.washdc.fios.verizon.net (74.96.37.218). Requested URL: '/media/local/sounds/temp/chime_tts/kquxm20n.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIxNjIyNjVmNGJmNWQ0YWY3YjA3NjY4ODEzMzYwMzBmMiIsInBhdGgiOiIvbWVkaWEvbG9jYWwvc291bmRzL3RlbXAvY2hpbWVfdHRzL2txdXhtMjBuLm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTcyMDM2NTc1OCwiZXhwIjoxNzIwNDUyMTU4fQ.l9rH-3wBZsIkG4UOdeK1ceQTu504erFxrRiQk5YPT3I'. (Linux UPnP/1.0 Sonos/80.1-55014 (ZPS14))```

Hello,

I have a morning announcement but it always do s the announcement twice.
I did an delete and reinstall of the intergration but that didnโ€™t help.
Anybody else encountered this?

Cam anyone confirm that tts stop working with HomePod os18?

Iโ€™ve found that the Announce parameter needs to be set in Chime_TTS so that everything works as you want, ie Mute the current play source, make the announcement at what ever volume you want, resume the playback at the original volume level.

Hey @dbullendsl ! Yes, โ€˜Announceโ€™ needs to be set in Chime_TTS.

My inquiry was asking if Spotify is playing on a bunch of speakers (or everywhere), is Chime TTS only to stop playing on an individual speaker (that youโ€™ve programmed an automation for example), and keep playing on all other speakers itโ€™s currently playing on, or does Chime TTS stop Spofiy completely, in other words, all speakers itโ€™s playing on?

My friend had 10 Alexa devices playing spotify, and he setup an automation using one of the 10 speakers and he wanted Spotify to be interrupted only on that one speaker, and not have Chime TTS stop Spotify on all his other speakers - which it did.

So is this by design or would it be a bug, or a feature request?

I have only 2 Sonos speakers to test with, but to test I started both of them grouped and playing a Spotify play list. Then issue a TTS Say to one of them - the announcement played on the unit I requested and the other Sonos player continued with the playlist, then the speaker used for the announcement resumed the playlist in sync with the other at the previous volume. Is your friend grouping the Sonos speaker or is he playing separate playlist on each? The action does not stop the playback on the other speakers.

He does group them. Could that be why it stopped on the other speakers? Keep in mind, his devices are Alexa devices and not Sonos. So maybe they are different like that?

My appologies, I missed the information that your friend was using Alexas. I have those too but am in the process of abandoning them in favor of Sonos Roam 2 devices for several reasons. I did test playing a Spotify playlist on my Alexas and there are differences.

The grouping of the speakers is done in the Alexa app, when playing an announcement DONโ€™T set any parameters like JOIN, UNJOIN, ANNOUNCE, or FADE AUDIO. Donโ€™t mix target devices, ie, Alexa, and Sonos. Do use the parameter for Conversion (although I think this is now default if Alexa speakers are set for output).

service: chime_tts.say
data:
  chime_path: custom_components/chime_tts/mp3s/bells.mp3
  end_chime_path: custom_components/chime_tts/mp3s/tada.mp3
  message: Hello
  tts_platform: tts.piper
  volume_level: 0.75
  audio_conversion: Alexa
target:
  entity_id: media_player.sunroom_echo_dot

Using these parameters I do find that individual Alexa devices can make the announcements without impacting the others. The problem Iโ€™ve found with the Alexas is that theyโ€™re cloud based and even though my network and internet connection is very robust the time to make the announcement varies and sometimes the chime_tts: say call times out before the speaker is done making the announcement even though I have the service call time out set quite high. As a result, when the announcement has finished on the device the volume never returns to the original playlist volume on that device.

Hope this makes sense,

Iโ€™m having the same issue described by @msl2424 on the latest release and beta versions. I verified that my public folder is publicly accessible, and then I took a look at the mp3 files that get copied to the public folder and found:

  1. With only an Alexa device in a chime_tts.say call from the developer tools or from a script/automation: the public mp3 is in the Alexa format (post ffmpeg conversion).

  2. With both an Alexa device and a local device (Sonos, Homepod, etc.) on a chime_tts.say call from the developer tools: the public mp3 is in the Alexa format (post ffmpeg conversion).

  3. With both an Alexa device and a local device (Sonos, Homepod, etc.) on a chime_tts.say call from a script or automation: the public mp3 is not in the Alexa format. The Alexa converted mp3 is created successfully per the debug logs, but it appears the original is copied to the public folder instead.

Itโ€™s quite strange that the behavior is different depending on where the service call is triggered. All with the exact same yaml service call definition.

Hopefully this is a helpful clue.

Public file in cases 1 & 2 above:

File Summary
File Name : um_17a0p.mp3
Channels : 2
Sample Rate : 24000
Precision : 16-bit
Duration : 00:00:02.54 = 61056 samples ~ 190.8 CDDA sectors
File Size : 15.3k
Bit Rate : 48.1k
Sample Encoding: MPEG audio (layer I, II or III)

Public File in Case 3

File Summary
File Name : le32nmkc.mp3
Channels : 2
Sample Rate : 44100
Precision : 16-bit
Duration : 00:00:02.53 = 111705 samples = 189.974 CDDA sectors
File Size : 40.8k
Bit Rate : 129k
Sample Encoding: MPEG audio (layer I, II or III)

aaronm23, In Case 3, I see the bitrate shows 129k when the limitation is 48k. Case 1 and 2 both show 48k which I suspect why it works on those two scenarios. Not sure how to fix it for Case 3, that would be up to @Nimrod_Dolev .

He needs the debugging log. You can enable debug logging by going to Settings โ€”> Devices & Services โ€”> Chime TTS โ€”> Enable debug logging

Case 1: Works - Called from Developer Tools with Alexa and Homepod

2024-07-31 14:05:10.672 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-07-31 14:05:10.672 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say Called. Version v1.1.4-beta4 โ•‘
2024-07-31 14:05:10.672 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-07-31 14:05:10.672 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids:
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.kitchen
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.aaron_s_3rd_echo_dot
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = bells_2
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Test
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = tts.piper
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = True
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = True
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * audio_conversion = -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.kitchen
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: apple_tv
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.625
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: entity_id: media_player.aaron_s_3rd_echo_dot
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: -1.0
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-07-31 14:05:10.873 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-07-31 14:05:10.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-07-31 14:05:10.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-07-31 14:05:10.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-07-31 14:05:10.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:05:10.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-07-31 14:05:10.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:05:10.874 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/bells_2.mp3
2024-07-31 14:05:10.874 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/bells_2.mp3"...
2024-07-31 14:05:10.947 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.279s
2024-07-31 14:05:10.948 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-07-31 14:05:10.948 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'tts.piper'
2024-07-31 14:05:10.948 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Test'
2024-07-31 14:05:10.948 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-07-31 14:05:10.948 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-07-31 14:05:10.948 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-07-31 14:05:11.120 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 170.0ms
2024-07-31 14:05:11.122 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to local folder: /media/sounds/temp/chime_tts/...
2024-07-31 14:05:11.122 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Creating audio folder: /media/sounds/temp/chime_tts/
2024-07-31 14:05:11.184 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/kgbwh_yy.mp3
2024-07-31 14:05:11.184 DEBUG (MainThread) [custom_components.chime_tts] - Performing FFmpeg audio conversion...
2024-07-31 14:05:11.184 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Running FFMpeg operation: "ffmpeg -i /media/sounds/temp/chime_tts/kgbwh_yy.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /media/sounds/temp/chime_tts/kgbwh_yy_converted.mp3"
2024-07-31 14:05:11.235 DEBUG (MainThread) [custom_components.chime_tts] ...FFmpeg audio conversion completed.
2024-07-31 14:05:11.305 DEBUG (MainThread) [custom_components.chime_tts] - Saving generated audio to public folder: /config/www/chime_tts/...
2024-07-31 14:05:11.366 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/chime_tts/fwvyqv6p.mp3
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 2.544
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] * local_path = "/media/sounds/temp/chime_tts/kgbwh_yy.mp3"
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] * public_path = "https://<redacted>/local/chime_tts/fwvyqv6p.mp3"
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/kgbwh_yy.mp3"
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Chime TTS playback โ”‚
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] 1 Regular media player detected:
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] - media_player.kitchen
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] 1 Alexa media player detected:
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] - media_player.aaron_s_3rd_echo_dot
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.kitchen']
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] - announce: True
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-07-31 14:05:11.367 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/kgbwh_yy.mp3
2024-07-31 14:05:11.369 DEBUG (MainThread) [custom_components.chime_tts] Calling notify.alexa_media with data:
2024-07-31 14:05:11.369 DEBUG (MainThread) [custom_components.chime_tts] - message: <audio src="https://<redacted>/local/chime_tts/fwvyqv6p.mp3"/>
2024-07-31 14:05:11.369 DEBUG (MainThread) [custom_components.chime_tts] - data: {'type': 'tts'}
2024-07-31 14:05:11.369 DEBUG (MainThread) [custom_components.chime_tts] - target: ['media_player.aaron_s_3rd_echo_dot']
2024-07-31 14:05:11.369 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 2.544s for audio playback to complete...
2024-07-31 14:05:13.914 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing...
2024-07-31 14:05:13.914 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] โœ” media_player.aaron_s_3rd_echo_dot
2024-07-31 14:05:17.520 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ๐˜… media_player.kitchen - Timed out. Current state: playing
2024-07-31 14:05:17.520 DEBUG (MainThread) [custom_components.chime_tts] - Timed out waiting for playback to complete
2024-07-31 14:05:17.520 DEBUG (MainThread) [custom_components.chime_tts] Removing temporary files:
2024-07-31 14:05:17.520 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Deleting file /media/sounds/temp/chime_tts/kgbwh_yy.mp3
2024-07-31 14:05:17.520 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Deleting file /config/www/chime_tts/fwvyqv6p.mp3
2024-07-31 14:05:17.521 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:05:17.521 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚โ”€โ”€โ”€โ”€ Chime TTS Say Completed in 6.65 s โ”€โ”€โ”€โ”€โ”‚
2024-07-31 14:05:17.521 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:05:17.521 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Service call completed successfully
2024-07-31 14:05:17.521 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Queue now empty

Case 2: Works - Called from Automation with Alexa only

2024-07-31 14:05:50.838 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-07-31 14:05:50.838 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say Called. Version v1.1.4-beta4 โ•‘
2024-07-31 14:05:50.838 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-07-31 14:05:50.838 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = ['media_player.aaron_s_3rd_echo_dot']
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = bells
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Test
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = True
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = True
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * audio_conversion = -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.aaron_s_3rd_echo_dot
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: -1.0
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/bells.mp3
2024-07-31 14:05:50.839 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/bells.mp3"...
2024-07-31 14:05:50.908 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 0.944s
2024-07-31 14:05:50.908 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - No `tts_platform` parameter was provided and no default TTS platform/entity has been set in the configuration configuration. Using 'google_translate'
2024-07-31 14:05:50.908 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-07-31 14:05:50.908 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'google_translate'
2024-07-31 14:05:50.908 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Test'
2024-07-31 14:05:50.908 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-07-31 14:05:50.908 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-07-31 14:05:50.908 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-07-31 14:05:51.234 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 330.0ms
2024-07-31 14:05:51.234 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to public folder: /config/www/chime_tts/...
2024-07-31 14:05:51.285 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/chime_tts/th3fasv7.mp3
2024-07-31 14:05:51.285 DEBUG (MainThread) [custom_components.chime_tts] - Performing FFmpeg audio conversion...
2024-07-31 14:05:51.285 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Running FFMpeg operation: "ffmpeg -i /config/www/chime_tts/th3fasv7.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /config/www/chime_tts/th3fasv7_converted.mp3"
2024-07-31 14:05:51.332 DEBUG (MainThread) [custom_components.chime_tts] ...FFmpeg audio conversion completed.
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 2.352
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] * local_path = None
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] * public_path = "https://<redacted>/local/chime_tts/th3fasv7.mp3"
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = None
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Chime TTS playback โ”‚
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] 1 Alexa media player detected:
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] - media_player.aaron_s_3rd_echo_dot
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] Calling notify.alexa_media with data:
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] - message: <audio src="https://<redacted>/local/chime_tts/th3fasv7.mp3"/>
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] - data: {'type': 'tts'}
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] - target: ['media_player.aaron_s_3rd_echo_dot']
2024-07-31 14:05:51.401 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 2.352s for audio playback to complete...
2024-07-31 14:05:53.753 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 1 media_player isn't playing...
2024-07-31 14:05:53.754 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] โœ” media_player.aaron_s_3rd_echo_dot
2024-07-31 14:05:53.754 DEBUG (MainThread) [custom_components.chime_tts] Removing temporary file:
2024-07-31 14:05:53.754 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Deleting file /config/www/chime_tts/th3fasv7.mp3
2024-07-31 14:05:53.754 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:05:53.754 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚โ”€โ”€โ”€โ”€ Chime TTS Say Completed in 2.92 s โ”€โ”€โ”€โ”€โ”‚
2024-07-31 14:05:53.754 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:05:53.754 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Service call completed successfully
2024-07-31 14:05:53.754 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Queue now empty

Case 3: Doesnโ€™t Work - Called from Automation with Alexa and Homepod

2024-07-31 14:06:00.571 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-07-31 14:06:00.571 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say Called. Version v1.1.4-beta4 โ•‘
2024-07-31 14:06:00.571 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-07-31 14:06:00.571 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids:
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.kitchen
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.aaron_s_3rd_echo_dot
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = bells
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Test
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = True
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = True
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * audio_conversion = -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.kitchen
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: apple_tv
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.625
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: entity_id: media_player.aaron_s_3rd_echo_dot
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: -1.0
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-07-31 14:06:00.572 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:06:00.573 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/bells.mp3
2024-07-31 14:06:00.573 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/bells.mp3"...
2024-07-31 14:06:00.653 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 0.944s
2024-07-31 14:06:00.653 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - No `tts_platform` parameter was provided and no default TTS platform/entity has been set in the configuration configuration. Using 'google_translate'
2024-07-31 14:06:00.653 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-07-31 14:06:00.653 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'google_translate'
2024-07-31 14:06:00.653 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Test'
2024-07-31 14:06:00.653 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-07-31 14:06:00.653 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-07-31 14:06:00.653 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-07-31 14:06:00.728 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 70.0ms
2024-07-31 14:06:00.728 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to local folder: /media/sounds/temp/chime_tts/...
2024-07-31 14:06:00.778 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/bnvkrxmf.mp3
2024-07-31 14:06:00.778 DEBUG (MainThread) [custom_components.chime_tts] - Performing FFmpeg audio conversion...
2024-07-31 14:06:00.778 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Running FFMpeg operation: "ffmpeg -i /media/sounds/temp/chime_tts/bnvkrxmf.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /media/sounds/temp/chime_tts/bnvkrxmf_converted.mp3"
2024-07-31 14:06:00.825 DEBUG (MainThread) [custom_components.chime_tts] ...FFmpeg audio conversion completed.
2024-07-31 14:06:00.895 DEBUG (MainThread) [custom_components.chime_tts] - Saving generated audio to public folder: /config/www/chime_tts/...
2024-07-31 14:06:00.943 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/chime_tts/i7np5cj5.mp3
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 2.352
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] * local_path = "/media/sounds/temp/chime_tts/bnvkrxmf.mp3"
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] * public_path = "https://<redacted>/local/chime_tts/i7np5cj5.mp3"
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/bnvkrxmf.mp3"
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Chime TTS playback โ”‚
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] 1 Regular media player detected:
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] - media_player.kitchen
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] 1 Alexa media player detected:
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] - media_player.aaron_s_3rd_echo_dot
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.kitchen']
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] - announce: True
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-07-31 14:06:00.944 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/bnvkrxmf.mp3
2024-07-31 14:06:00.946 DEBUG (MainThread) [custom_components.chime_tts] Calling notify.alexa_media with data:
2024-07-31 14:06:00.946 DEBUG (MainThread) [custom_components.chime_tts] - message: <audio src="https://<redacted>/local/chime_tts/i7np5cj5.mp3"/>
2024-07-31 14:06:00.946 DEBUG (MainThread) [custom_components.chime_tts] - data: {'type': 'tts'}
2024-07-31 14:06:00.946 DEBUG (MainThread) [custom_components.chime_tts] - target: ['media_player.aaron_s_3rd_echo_dot']
2024-07-31 14:06:00.946 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 2.352s for audio playback to complete...
2024-07-31 14:06:03.299 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing...
2024-07-31 14:06:03.299 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] โœ” media_player.aaron_s_3rd_echo_dot
2024-07-31 14:06:06.705 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] โœ” media_player.kitchen
2024-07-31 14:06:06.705 DEBUG (MainThread) [custom_components.chime_tts] Removing temporary files:
2024-07-31 14:06:06.705 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Deleting file /media/sounds/temp/chime_tts/bnvkrxmf.mp3
2024-07-31 14:06:06.705 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Deleting file /config/www/chime_tts/i7np5cj5.mp3
2024-07-31 14:06:06.706 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-07-31 14:06:06.706 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚โ”€โ”€โ”€โ”€ Chime TTS Say Completed in 6.13 s โ”€โ”€โ”€โ”€โ”‚
2024-07-31 14:06:06.706 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-07-31 14:06:06.706 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Service call completed successfully
2024-07-31 14:06:06.706 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Queue now empty

Alexa Media Player has a couple issues recently but has now since recovered with their latest update. (I had to delete the integration and reinstall, and reconfigure it <to include the trailing / > after I updated it to 4.12.7 in order to get it working)

However. here with Chime_TTS v1.1.4-beta 4, it still doesnโ€™t make the announement even after updating AMP.

Just downgrade the integration to Chime_TTS v1.1.4-beta 3 and AMP will work again.

Thereโ€™s just something about beta 4 that is causing it to break. Hope this helps somoene else in the meantime.

OK, Iโ€™ve been incredibly slack about testing this (real life happens) but now Iโ€™m on it again and I am really liking it so far. Iโ€™m currently on v1.1.3 but will move to the latest beta very soon.

I have one feature request:

Would it be possible to allow the volume of each media player to be set individually?

Sorry if this is already possible and I missed it.

EDIT:
It seems I did!

volume_level:
  - media_player.kitchen: 1.00
  - media_player.bedroom: 0.45
  - media_player.living_room: 0.75
  - media_player.study: 0.5

It appears the ElevenLabs_TTS โ€œtts.elevenlabs_ttsโ€ integration is being phased out in favor of an official ElevenLabs integration. โ€œtts.elevenlabsโ€ Currently they can coexist, no information on how long.