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

So after the 1.1.0 updates my TTS no longer works. I can get it to work when I call a service in HA however when I use my separate automation engine called Multi System Reactor I see the below in the logs. It all used to work no problem prior to 1.1.0

2024-06-27 10:13:51.540 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.3 -----
2024-06-27 10:13:51.540 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-06-27 10:13:51.541 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.3 -----
2024-06-27 10:13:51.541 ERROR (MainThread) [custom_components.chime_tts] Error calling chime_tts.say service: '>' not supported between instances of 'str' and 'int'
2024-06-27 10:13:51.541 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140065430320128] Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/chime_tts/__init__.py", line 134, in async_say
result = await queue.add_to_queue(async_say_execute, timeout, service, is_say_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 162, in async_say_execute
params = await helpers.async_parse_params(hass, service.data, is_say_url, media_player_helper)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/helpers.py", line 191, in async_parse_params
media_players_array = await media_player_helper.async_initialize_media_players(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/media_player_helper.py", line 66, in async_initialize_media_players
media_player_object = await self.async_get_media_player_object(hass, entity_id, volume_level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/media_player_helper.py", line 85, in async_get_media_player_object
return ChimeTTSMediaPlayer(
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/media_player.py", line 37, in __init__
self.target_volume_level: float = target_volume_level
^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/media_player.py", line 106, in target_volume_level
self._target_volume_level = value if value > 0 else -1.0
^^^^^^^^^
TypeError: '>' not supported between instances of 'str' and 'int'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 138, in async_say
raise HomeAssistantError(error) from error
homeassistant.exceptions.HomeAssistantError: '>' not supported between instances of 'str' and 'int'

Can you please enable debug logging and report back with the full debug log messages?

Hmm I have debugging enabled but these are all the debug logs that are coming through

2024-06-27 11:17:31.978 WARNING (MainThread) [async_upnp_client.profiles.dlna] Only InstanceID 0 is supported
2024-06-27 11:21:31.978 WARNING (MainThread) [async_upnp_client.profiles.dlna] Only InstanceID 0 is supported
2024-06-27 11:21:46.618 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.3 -----
2024-06-27 11:21:46.618 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-06-27 11:21:46.618 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.3 -----
2024-06-27 11:21:46.619 ERROR (MainThread) [custom_components.chime_tts] Error calling chime_tts.say service: '>' not supported between instances of 'str' and 'int'
2024-06-27 11:21:46.620 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140065430320128] Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/chime_tts/__init__.py", line 134, in async_say
result = await queue.add_to_queue(async_say_execute, timeout, service, is_say_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 162, in async_say_execute
params = await helpers.async_parse_params(hass, service.data, is_say_url, media_player_helper)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/helpers.py", line 191, in async_parse_params
media_players_array = await media_player_helper.async_initialize_media_players(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/media_player_helper.py", line 66, in async_initialize_media_players
media_player_object = await self.async_get_media_player_object(hass, entity_id, volume_level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/media_player_helper.py", line 85, in async_get_media_player_object
return ChimeTTSMediaPlayer(
^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/media_player.py", line 37, in __init__
self.target_volume_level: float = target_volume_level
^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers/media_player.py", line 106, in target_volume_level
self._target_volume_level = value if value > 0 else -1.0
^^^^^^^^^
TypeError: '>' not supported between instances of 'str' and 'int'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 138, in async_say
raise HomeAssistantError(error) from error
homeassistant.exceptions.HomeAssistantError: '>' not supported between instances of 'str' and 'int'

I updated to new beta, v1.1.4-beta2, using the steps that you suggested. Now, I get the following error message on the Echo device, “Sorry, I’m having trouble accessing your Simon Says NA skill right now .” But it only gives that error message when I am sending a Chime TTS Say call to both a Sonos speaker and an Alexa (Echo) device at the same time. If I just send the service call to only the Sonos speaker, it works. If I send it to only the Alexa speaker, it works. If I send to both Sonos and Alexa, it works on the Sonos, but plays that error message on Alexa.

I read about others getting the same Simon error message with Alexa, and I tried the solutions mentioned in this thread. Adding / at the end of my public URL didn’t make a difference, and adding the external URL to my config file resulted in no sound coming from the Alexa whatsoever.

Could you please share the YAML you used in the service call?

Here’s a screenshot of the yaml… its a bit different to copy paste the exact code since I am using a different logic engine than HA built in one

I’m not familiar with the Multi System Reactor engine, but it appears as though the volume_level is being sent as a string instead of a float value. I will include a fix to ensure that the value is converted to a float, but for the time being - does the engine allow you to define the data type of the volume_level parameter?

@Nimrod_Dolev Following-up on my prior comment regarding my testing of new beta, v1.1.4-beta2. I’m including the full logs below. There are four scenarios that I tested, and here is the high level summary:

  1. Chime TTS Say with Sonos speaker only: Works as expected
  2. Chime TTS Say with Alexa (Echo) speaker only: Works as expected
  3. Chime TTS Say with Sonos and Alexa speaker: Sonos works as expected; Alexa speaker says, “Sorry, I’m having trouble accessing your Simon Says NA skill right now.”
  4. Chime TTS Say with Sonos and Alexa speaker parallelized: The announcement is executed on both the Sonos and Alexa speakers; however, it occurs in sequence (Sonos announcement, and then the Alexa announcement, with a 5-7 second pause in between) as opposed to both happening in parallel.

The logs are too long to paste in one message, so will split it up. Here’s the first set of logs:

2024-06-28 08:56:00.973 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.4-beta2 -----
2024-06-28 08:56:00.973 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-06-28 08:56:00.974 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-06-28 08:56:00.975 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = ['media_player.basement_bedroom']
2024-06-28 08:56:00.975 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = /config/www/custom_audio/Alexa_Notification.mp3
2024-06-28 08:56:00.975 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-06-28 08:56:00.975 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-06-28 08:56:00.975 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-06-28 08:56:00.975 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = This is a test
2024-06-28 08:56:00.976 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-06-28 08:56:00.976 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-06-28 08:56:00.976 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-06-28 08:56:00.976 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-06-28 08:56:00.976 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-06-28 08:56:00.976 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-06-28 08:56:00.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-06-28 08:56:00.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-06-28 08:56:00.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.basement_bedroom
2024-06-28 08:56:00.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-28 08:56:00.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.25
2024-06-28 08:56:00.977 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:00.978 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:00.978 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-28 08:56:00.978 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-28 08:56:00.980 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/www/custom_audio/Alexa_Notification.mp3"...
2024-06-28 08:56:01.280 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.75s
2024-06-28 08:56:01.285 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - Using default TTS platform: 'google_translate'
2024-06-28 08:56:01.286 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-06-28 08:56:01.286 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'google_translate'
2024-06-28 08:56:01.286 DEBUG (MainThread) [custom_components.chime_tts] * message = 'This is a test'
2024-06-28 08:56:01.286 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-06-28 08:56:01.286 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-06-28 08:56:01.286 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-06-28 08:56:01.812 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 530.0ms
2024-06-28 08:56:01.826 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to local folder: /media/sounds/temp/chime_tts/...
2024-06-28 08:56:02.145 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/av0takid.mp3
2024-06-28 08:56:02.440 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-06-28 08:56:02.441 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 3.616
2024-06-28 08:56:02.441 DEBUG (MainThread) [custom_components.chime_tts] * local_path = "/media/sounds/temp/chime_tts/av0takid.mp3"
2024-06-28 08:56:02.441 DEBUG (MainThread) [custom_components.chime_tts] * public_path = None
2024-06-28 08:56:02.441 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/av0takid.mp3"
2024-06-28 08:56:02.441 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:02.441 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-06-28 08:56:02.441 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:02.442 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:02.442 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-06-28 08:56:02.442 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:02.442 DEBUG (MainThread) [custom_components.chime_tts] 1 Sonos media player detected:
2024-06-28 08:56:02.442 DEBUG (MainThread) [custom_components.chime_tts] - media_player.basement_bedroom
2024-06-28 08:56:02.442 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-06-28 08:56:02.442 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.basement_bedroom']
2024-06-28 08:56:02.442 DEBUG (MainThread) [custom_components.chime_tts] - announce: False
2024-06-28 08:56:02.443 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-06-28 08:56:02.443 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/av0takid.mp3
2024-06-28 08:56:02.446 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.616s for audio playback to complete...
2024-06-28 08:56:06.073 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 1 media_player isn't playing...
2024-06-28 08:56:06.678 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.basement_bedroom
2024-06-28 08:56:06.680 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 5.71 s -----
2024-06-28 08:56:10.702 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.4-beta2 -----
2024-06-28 08:56:10.702 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-06-28 08:56:10.706 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-06-28 08:56:10.707 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = ['media_player.michael_s_2nd_echo_dot']
2024-06-28 08:56:10.707 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = /config/www/custom_audio/Alexa_Notification.mp3
2024-06-28 08:56:10.707 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-06-28 08:56:10.707 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-06-28 08:56:10.707 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-06-28 08:56:10.708 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = This is a test
2024-06-28 08:56:10.709 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-06-28 08:56:10.709 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-06-28 08:56:10.709 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-06-28 08:56:10.710 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-06-28 08:56:10.710 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-06-28 08:56:10.710 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-06-28 08:56:10.710 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-06-28 08:56:10.710 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-06-28 08:56:10.710 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-06-28 08:56:10.710 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:10.711 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-06-28 08:56:10.711 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.27
2024-06-28 08:56:10.711 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:10.711 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:10.711 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-06-28 08:56:10.711 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-06-28 08:56:10.711 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-06-28 08:56:10.714 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/www/custom_audio/Alexa_Notification.mp3"...
2024-06-28 08:56:11.020 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.75s
2024-06-28 08:56:11.025 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - Using default TTS platform: 'google_translate'
2024-06-28 08:56:11.025 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-06-28 08:56:11.025 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'google_translate'
2024-06-28 08:56:11.025 DEBUG (MainThread) [custom_components.chime_tts] * message = 'This is a test'
2024-06-28 08:56:11.026 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-06-28 08:56:11.026 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-06-28 08:56:11.027 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-06-28 08:56:11.306 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 280.0ms
2024-06-28 08:56:11.320 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to public folder: /config/www/chime_tts/...
2024-06-28 08:56:11.641 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/chime_tts/6h6z_5bs.mp3
2024-06-28 08:56:11.641 DEBUG (MainThread) [custom_components.chime_tts] - Performing FFmpeg audio conversion...
2024-06-28 08:56:11.641 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Converting audio: "ffmpeg -i /config/www/chime_tts/6h6z_5bs.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /config/www/chime_tts/6h6z_5bs_converted.mp3"
2024-06-28 08:56:11.900 DEBUG (MainThread) [custom_components.chime_tts] ...FFmpeg audio conversion completed.
2024-06-28 08:56:12.208 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage:
2024-06-28 08:56:12.208 DEBUG (MainThread) [custom_components.chime_tts] - key: "19dd4edba2ab2426b859fb30c4ffee6013ea5020f3efd1f9754b41b3df137453"
2024-06-28 08:56:12.208 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'public_path': '/config/www/chime_tts/6h6z_5bs.mp3', 'audio_duration': 3.672, 'local_path': None}"
2024-06-28 08:56:12.213 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-06-28 08:56:12.214 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 3.672
2024-06-28 08:56:12.214 DEBUG (MainThread) [custom_components.chime_tts] * local_path = None
2024-06-28 08:56:12.214 DEBUG (MainThread) [custom_components.chime_tts] * public_path = "https://private.url//local/chime_tts/6h6z_5bs.mp3"
2024-06-28 08:56:12.214 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = None
2024-06-28 08:56:12.214 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:12.215 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-06-28 08:56:12.215 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:12.215 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:12.215 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-06-28 08:56:12.215 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:12.215 DEBUG (MainThread) [custom_components.chime_tts] 1 Alexa media player detected:
2024-06-28 08:56:12.215 DEBUG (MainThread) [custom_components.chime_tts] - media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:12.216 DEBUG (MainThread) [custom_components.chime_tts] Calling notify.alexa_media with data:
2024-06-28 08:56:12.216 DEBUG (MainThread) [custom_components.chime_tts] - message: <audio src="https://private.url//local/chime_tts/6h6z_5bs.mp3"/>
2024-06-28 08:56:12.216 DEBUG (MainThread) [custom_components.chime_tts] - data: {'type': 'tts'}
2024-06-28 08:56:12.216 DEBUG (MainThread) [custom_components.chime_tts] - target: ['media_player.michael_s_2nd_echo_dot']
2024-06-28 08:56:12.217 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.672s for audio playback to complete...
2024-06-28 08:56:15.892 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 1 media_player isn't playing...
2024-06-28 08:56:15.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:15.893 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 5.19 s -----
2024-06-28 08:56:24.691 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.4-beta2 -----
2024-06-28 08:56:24.691 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-06-28 08:56:24.692 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-06-28 08:56:24.693 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids:
2024-06-28 08:56:24.693 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:24.693 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.basement_bedroom
2024-06-28 08:56:24.693 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = /config/www/custom_audio/Alexa_Notification.mp3
2024-06-28 08:56:24.693 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-06-28 08:56:24.693 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-06-28 08:56:24.693 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-06-28 08:56:24.694 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = This is a test
2024-06-28 08:56:24.694 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-06-28 08:56:24.694 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-06-28 08:56:24.694 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-06-28 08:56:24.694 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-06-28 08:56:24.694 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-06-28 08:56:24.694 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-06-28 08:56:24.694 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-06-28 08:56:24.695 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-06-28 08:56:24.695 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-06-28 08:56:24.695 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:24.695 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-06-28 08:56:24.695 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.27
2024-06-28 08:56:24.695 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:24.695 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:24.695 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-06-28 08:56:24.696 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-06-28 08:56:24.696 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: entity_id: media_player.basement_bedroom
2024-06-28 08:56:24.696 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-28 08:56:24.696 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.25
2024-06-28 08:56:24.696 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:24.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:24.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-28 08:56:24.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-28 08:56:24.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-06-28 08:56:24.700 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/www/custom_audio/Alexa_Notification.mp3"...
2024-06-28 08:56:24.993 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.75s
2024-06-28 08:56:24.997 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - Using default TTS platform: 'google_translate'
2024-06-28 08:56:24.997 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-06-28 08:56:24.997 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'google_translate'
2024-06-28 08:56:24.998 DEBUG (MainThread) [custom_components.chime_tts] * message = 'This is a test'
2024-06-28 08:56:24.998 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-06-28 08:56:24.998 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-06-28 08:56:24.999 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-06-28 08:56:25.286 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 290.0ms
2024-06-28 08:56:25.300 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to local folder: /media/sounds/temp/chime_tts/...
2024-06-28 08:56:25.607 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/y4ctnmz9.mp3
2024-06-28 08:56:25.607 DEBUG (MainThread) [custom_components.chime_tts] - Performing FFmpeg audio conversion...
2024-06-28 08:56:25.608 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Converting audio: "ffmpeg -i /media/sounds/temp/chime_tts/y4ctnmz9.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /media/sounds/temp/chime_tts/y4ctnmz9_converted.mp3"
2024-06-28 08:56:25.861 DEBUG (MainThread) [custom_components.chime_tts] ...FFmpeg audio conversion completed.
2024-06-28 08:56:26.166 DEBUG (MainThread) [custom_components.chime_tts] - Saving generated audio to public folder: /config/www/chime_tts/...
2024-06-28 08:56:26.484 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/chime_tts/ojns32ie.mp3
2024-06-28 08:56:26.488 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage:
2024-06-28 08:56:26.488 DEBUG (MainThread) [custom_components.chime_tts] - key: "19dd4edba2ab2426b859fb30c4ffee6013ea5020f3efd1f9754b41b3df137453"
2024-06-28 08:56:26.488 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'public_path': '/config/www/chime_tts/ojns32ie.mp3', 'audio_duration': 3.672, 'local_path': None}"
2024-06-28 08:56:26.494 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-06-28 08:56:26.494 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 3.672
2024-06-28 08:56:26.494 DEBUG (MainThread) [custom_components.chime_tts] * local_path = "/media/sounds/temp/chime_tts/y4ctnmz9.mp3"
2024-06-28 08:56:26.494 DEBUG (MainThread) [custom_components.chime_tts] * public_path = "https://private.url//local/chime_tts/ojns32ie.mp3"
2024-06-28 08:56:26.495 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/y4ctnmz9.mp3"```

@Nimrod_Dolev Here is the second (final) set of logs:

2024-06-28 08:56:26.495 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:26.495 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-06-28 08:56:26.495 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:26.495 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:26.495 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-06-28 08:56:26.495 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:26.496 DEBUG (MainThread) [custom_components.chime_tts] 1 Sonos media player detected:
2024-06-28 08:56:26.496 DEBUG (MainThread) [custom_components.chime_tts] - media_player.basement_bedroom
2024-06-28 08:56:26.496 DEBUG (MainThread) [custom_components.chime_tts] 1 Alexa media player detected:
2024-06-28 08:56:26.496 DEBUG (MainThread) [custom_components.chime_tts] - media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:26.496 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-06-28 08:56:26.496 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.basement_bedroom']
2024-06-28 08:56:26.496 DEBUG (MainThread) [custom_components.chime_tts] - announce: False
2024-06-28 08:56:26.497 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-06-28 08:56:26.497 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/y4ctnmz9.mp3
2024-06-28 08:56:26.502 DEBUG (MainThread) [custom_components.chime_tts] Calling notify.alexa_media with data:
2024-06-28 08:56:26.502 DEBUG (MainThread) [custom_components.chime_tts] - message: <audio src="https://private.url//local/chime_tts/ojns32ie.mp3"/>
2024-06-28 08:56:26.502 DEBUG (MainThread) [custom_components.chime_tts] - data: {'type': 'tts'}
2024-06-28 08:56:26.503 DEBUG (MainThread) [custom_components.chime_tts] - target: ['media_player.michael_s_2nd_echo_dot']
2024-06-28 08:56:26.504 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.672s for audio playback to complete...
2024-06-28 08:56:30.185 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 2 media_players aren't playing...
2024-06-28 08:56:30.186 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:30.589 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.basement_bedroom
2024-06-28 08:56:30.590 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 5.9 s -----
2024-06-28 08:56:44.439 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.4-beta2 -----
2024-06-28 08:56:44.439 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-06-28 08:56:44.441 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.4-beta2 -----
2024-06-28 08:56:44.441 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-06-28 08:56:44.442 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-06-28 08:56:44.442 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids:
2024-06-28 08:56:44.442 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.basement_bedroom
2024-06-28 08:56:44.442 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.basement
2024-06-28 08:56:44.442 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 2: media_player.kids_bedroom
2024-06-28 08:56:44.442 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = /config/www/custom_audio/Alexa_Notification.mp3
2024-06-28 08:56:44.443 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-06-28 08:56:44.443 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-06-28 08:56:44.443 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-06-28 08:56:44.443 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = The washing machine is done
2024-06-28 08:56:44.443 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-06-28 08:56:44.443 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-06-28 08:56:44.443 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-06-28 08:56:44.443 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-06-28 08:56:44.444 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-06-28 08:56:44.444 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-06-28 08:56:44.444 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-06-28 08:56:44.444 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-06-28 08:56:44.444 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.basement_bedroom
2024-06-28 08:56:44.444 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-28 08:56:44.444 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.25
2024-06-28 08:56:44.446 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:44.446 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:44.447 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-28 08:56:44.447 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-28 08:56:44.447 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: entity_id: media_player.basement
2024-06-28 08:56:44.447 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-28 08:56:44.447 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.2
2024-06-28 08:56:44.447 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:44.447 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:44.448 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-28 08:56:44.448 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-28 08:56:44.448 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 2: entity_id: media_player.kids_bedroom
2024-06-28 08:56:44.448 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos
2024-06-28 08:56:44.448 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.33
2024-06-28 08:56:44.448 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:44.448 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:44.448 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True
2024-06-28 08:56:44.448 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True
2024-06-28 08:56:44.452 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/www/custom_audio/Alexa_Notification.mp3"...
2024-06-28 08:56:44.750 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.75s
2024-06-28 08:56:44.754 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - Using default TTS platform: 'google_translate'
2024-06-28 08:56:44.755 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-06-28 08:56:44.755 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'google_translate'
2024-06-28 08:56:44.755 DEBUG (MainThread) [custom_components.chime_tts] * message = 'The washing machine is done'
2024-06-28 08:56:44.755 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-06-28 08:56:44.755 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-06-28 08:56:44.755 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-06-28 08:56:45.244 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 490.0ms
2024-06-28 08:56:45.259 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to local folder: /media/sounds/temp/chime_tts/...
2024-06-28 08:56:45.601 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/6h7_78xl.mp3
2024-06-28 08:56:45.917 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-06-28 08:56:45.917 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 4.36
2024-06-28 08:56:45.917 DEBUG (MainThread) [custom_components.chime_tts] * local_path = "/media/sounds/temp/chime_tts/6h7_78xl.mp3"
2024-06-28 08:56:45.917 DEBUG (MainThread) [custom_components.chime_tts] * public_path = None
2024-06-28 08:56:45.917 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/6h7_78xl.mp3"
2024-06-28 08:56:45.917 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:45.917 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-06-28 08:56:45.917 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:45.917 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] 3 Sonos media players detected:
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] - media_player.basement_bedroom
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] - media_player.basement
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] - media_player.kids_bedroom
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.basement_bedroom', 'media_player.basement', 'media_player.kids_bedroom']
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] - announce: False
2024-06-28 08:56:45.918 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-06-28 08:56:45.919 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/6h7_78xl.mp3
2024-06-28 08:56:45.920 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 4.36s for audio playback to complete...
2024-06-28 08:56:50.285 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 3 media_players aren't playing...
2024-06-28 08:56:50.892 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.basement_bedroom
2024-06-28 08:56:50.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.basement
2024-06-28 08:56:50.893 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.kids_bedroom
2024-06-28 08:56:50.896 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 6.45 s -----
2024-06-28 08:56:50.898 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-06-28 08:56:50.898 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids:
2024-06-28 08:56:50.898 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: media_player.michael_s_echo
2024-06-28 08:56:50.898 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: media_player.michael_s_4th_echo_dot
2024-06-28 08:56:50.898 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 2: media_player.michael_s_echo_dot
2024-06-28 08:56:50.899 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 3: media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:50.899 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 4: media_player.michael_s_3rd_echo_dot
2024-06-28 08:56:50.899 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = /config/www/custom_audio/Alexa_Notification.mp3
2024-06-28 08:56:50.899 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-06-28 08:56:50.899 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-06-28 08:56:50.899 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-06-28 08:56:50.899 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = The washing machine is done
2024-06-28 08:56:50.900 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-06-28 08:56:50.900 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-06-28 08:56:50.900 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-06-28 08:56:50.900 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-06-28 08:56:50.900 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-06-28 08:56:50.900 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-06-28 08:56:50.900 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-06-28 08:56:50.900 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-06-28 08:56:50.901 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-06-28 08:56:50.901 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.michael_s_echo
2024-06-28 08:56:50.901 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-06-28 08:56:50.901 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.3
2024-06-28 08:56:50.901 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:50.902 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:50.902 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-06-28 08:56:50.902 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-06-28 08:56:50.902 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 1: entity_id: media_player.michael_s_4th_echo_dot
2024-06-28 08:56:50.902 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-06-28 08:56:50.903 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.23
2024-06-28 08:56:50.903 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:50.903 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:50.903 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-06-28 08:56:50.903 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-06-28 08:56:50.903 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 2: entity_id: media_player.michael_s_echo_dot
2024-06-28 08:56:50.903 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.33
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 3: entity_id: media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.27
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:50.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 4: entity_id: media_player.michael_s_3rd_echo_dot
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: alexa_media
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.27
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-06-28 08:56:50.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-06-28 08:56:50.908 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/www/custom_audio/Alexa_Notification.mp3"...
2024-06-28 08:56:51.219 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.75s
2024-06-28 08:56:51.223 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - Using default TTS platform: 'google_translate'
2024-06-28 08:56:51.224 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-06-28 08:56:51.224 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'google_translate'
2024-06-28 08:56:51.224 DEBUG (MainThread) [custom_components.chime_tts] * message = 'The washing machine is done'
2024-06-28 08:56:51.224 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-06-28 08:56:51.224 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-06-28 08:56:51.224 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-06-28 08:56:51.511 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 290.0ms
2024-06-28 08:56:51.528 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to public folder: /config/www/chime_tts/...
2024-06-28 08:56:51.871 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/chime_tts/yiqm32na.mp3
2024-06-28 08:56:51.871 DEBUG (MainThread) [custom_components.chime_tts] - Performing FFmpeg audio conversion...
2024-06-28 08:56:51.872 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Converting audio: "ffmpeg -i /config/www/chime_tts/yiqm32na.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /config/www/chime_tts/yiqm32na_converted.mp3"
2024-06-28 08:56:52.157 DEBUG (MainThread) [custom_components.chime_tts] ...FFmpeg audio conversion completed.
2024-06-28 08:56:52.473 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage:
2024-06-28 08:56:52.473 DEBUG (MainThread) [custom_components.chime_tts] - key: "b70a21d1844d6f3edd68d333bad33d6b179e8d927600b4d379d58d15efb15da4"
2024-06-28 08:56:52.473 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'public_path': '/config/www/chime_tts/yiqm32na.mp3', 'audio_duration': 4.416, 'local_path': None}"
2024-06-28 08:56:52.478 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-06-28 08:56:52.478 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 4.416
2024-06-28 08:56:52.478 DEBUG (MainThread) [custom_components.chime_tts] * local_path = None
2024-06-28 08:56:52.478 DEBUG (MainThread) [custom_components.chime_tts] * public_path = "https://private.url//local/chime_tts/yiqm32na.mp3"
2024-06-28 08:56:52.478 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = None
2024-06-28 08:56:52.479 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:52.479 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-06-28 08:56:52.479 DEBUG (MainThread) [custom_components.chime_tts] ****************************
2024-06-28 08:56:52.479 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:52.479 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-06-28 08:56:52.479 DEBUG (MainThread) [custom_components.chime_tts] **************************
2024-06-28 08:56:52.479 DEBUG (MainThread) [custom_components.chime_tts] 5 Alexa media players detected:
2024-06-28 08:56:52.480 DEBUG (MainThread) [custom_components.chime_tts] - media_player.michael_s_echo
2024-06-28 08:56:52.480 DEBUG (MainThread) [custom_components.chime_tts] - media_player.michael_s_4th_echo_dot
2024-06-28 08:56:52.480 DEBUG (MainThread) [custom_components.chime_tts] - media_player.michael_s_echo_dot
2024-06-28 08:56:52.480 DEBUG (MainThread) [custom_components.chime_tts] - media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:52.480 DEBUG (MainThread) [custom_components.chime_tts] - media_player.michael_s_3rd_echo_dot
2024-06-28 08:56:52.480 DEBUG (MainThread) [custom_components.chime_tts] Calling notify.alexa_media with data:
2024-06-28 08:56:52.480 DEBUG (MainThread) [custom_components.chime_tts] - message: <audio src="https://private.url//local/chime_tts/yiqm32na.mp3"/>
2024-06-28 08:56:52.480 DEBUG (MainThread) [custom_components.chime_tts] - data: {'type': 'tts'}
2024-06-28 08:56:52.481 DEBUG (MainThread) [custom_components.chime_tts] - target: ['media_player.michael_s_echo', 'media_player.michael_s_4th_echo_dot', 'media_player.michael_s_echo_dot', 'media_player.michael_s_2nd_echo_dot', 'media_player.michael_s_3rd_echo_dot']
2024-06-28 08:56:52.483 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 4.416s for audio playback to complete...
2024-06-28 08:56:56.904 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 5 media_players aren't playing...
2024-06-28 08:56:56.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.michael_s_echo
2024-06-28 08:56:56.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.michael_s_4th_echo_dot
2024-06-28 08:56:56.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.michael_s_echo_dot
2024-06-28 08:56:56.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.michael_s_2nd_echo_dot
2024-06-28 08:56:56.905 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.michael_s_3rd_echo_dot
2024-06-28 08:56:56.907 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 6.01 s -----

Thanks!! I can check with the developer and see if there’s a way.

You should edit this line to say:

external_url: “https://private.ui.nabu.casa

I purposely didn’t type your code so that later it won’t show in my reply to you. This code allows someone to access your Home Assistant and could easily hack their way in. So always redact your private code portion.

@Nimrod_Dolev I see you also copied his exact url in your reply. Should that be edited out so it’s not showing? Not trying to tell you what to do of course. I’ve just been told by others not to share it, that’s all.

@ColtonYYZ the post where I gave a YAML example with an external Nanu Casa URL is for a non-existent instance. Is this the post you were referring to?

Yeah, I wasn’t aware it is a non-existant instance. Sorry. But I see dwdonnelly already edited his nabu casa link to show “https://external_address:8123” instead of his actual private URL. :slight_smile:

1 Like

Hi @msl2424, thank you for testing the different combinations of your Sonos and Alexa devices and providing the debug logs.

In each test you ran that included an Alexa device (alone, with additional Alexa speakers or with additional Sonos devices) the debug logs showed the same service call data. This doesn’t provide me with any clarity unfortunately. The only other test I can think to try is to enable the cache (cache: true) when playing to both types of speakers in the same service call, to see if perhaps the bug is that the temporary file is deleted before playback is completed.

@Nimrod_Dolev I tested the different scenarios with cache: true but the results are the same.

Anyone else finding the audio is inconsistent? Worked yesterday morning and the morning before that. This morning it doesn’t work. Sometimes it works, sometimes it doesn’t.

I am using homepod speakers, now I am trying to run on a chromecast speaker with:

service: chime_tts.say
data:
  message: This is a test
  chime_path: bells
  tts_platform: cloud
target:
  entity_id: media_player.av_soundbar

Have debug logging enabled in the integration, but I don’t see anything there.

Had to restart the integration, then saw this in the log…

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/chime_tts/queue_manager.py:51
integration: Chime TTS (documentation, issues)
First occurred: 10:19:12 (1 occurrences)
Last logged: 10:19:12

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File “/config/custom_components/chime_tts/queue_manager.py”, line 42, in async_process_queue
service_call[‘future’].set_result(result)
asyncio.exceptions.InvalidStateError: invalid state

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/config/custom_components/chime_tts/queue_manager.py”, line 61, in queue_processor
await asyncio.gather(*tasks)
File “/config/custom_components/chime_tts/queue_manager.py”, line 51, in async_process_queue
service_call[‘future’].set_exception(e)
asyncio.exceptions.InvalidStateError: invalid state

hey Nim any chance this could be updated soon? :slight_smile:

Hi @msl2424, I just released a new beta version, v1.1.4-beta3, which includes a potential fix for your issue, but I am unable to verify it as I have neither Sonos nor Alexa speakers.

Could you please upgrade to the beta and report back whether the issue still occurs? If it does, please include full debug logs messages.

Hi @pabla, I just released a new beta version, v1.1.4-beta3, which includes a fix for the volume bug you reported.

Can you please upgrade to the beta and let me know if the issue is now resolved?

1 Like

yeaup looked like it worked thanks!!