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

Hey @ColtonYYZ. Iโ€™m starting to think the issue is with the file conversion process past v1.1.5-beta1. To test this, I would like to ask you to please:

  1. Upgrade to v1.1.6-beta4.
  2. Create a new MP3 via chime_tts.say (with cache set to true) and note the path from the log messages.
  3. Call the notify.alexa_media action using the file path from step 2

Hi Michael. I think the issue is that you selected google_translate from the list of TTS platforms, but based on the screenshot you provided: you have the tts.google_translate_en_com platform installed instead.

Explanation: The google_translate platform is added via the configuration.yaml file (and supports translating from any language to any language) but you likely added the tts.google_translate_en_com platform via the UI.

If you open the Chime TTS configuration page, you will see in the list of the TTS platforms you have installed, in the Default TTS Platform drop down list. If you want, you can set it as your default and then skip setting it when using Chime TTS, or note the value and use it whenever using Chime TTS in the future.

Morning Nim.

Yep, I can play he chime.mp3 on my HomePod using the media_player.play_media command.

All teh sudden Im having issues with Chime TTS Say URL.
This is the output:
{โ€˜urlโ€™: None, โ€˜media_content_idโ€™: None, โ€˜durationโ€™: 0, โ€˜successโ€™: False}

Hey Darrell. Thanks for testing playback of your custom MP3 on your Homepod.

Can you now please try the same action, but this time using the media_content_id value from the debug log messages from a call to chime_tts.say?

:exclamation: Remember to set cache as true otherwise the generated file will be deleted once the action is completed.

HI @Rich37804, iโ€™m sorry to hear it stopped working for you.

Can you please provide me with a screenshot of your Chime TTS configuration settings, as well as debug log messages after calling chime_tts.say_url?

Hopefully I can understand from that what the issue could be?

Hi Nim.

OK, I turned on debug and ran the automation again.

Predictably, no audio (chime or speech) came out of the HomePod. The composite file generated appears to be: /media/sounds/temp/chime_tts/qhzx78in.mp3. When I paste that into the media_player.play_media and execute, it comes out of the HomePod perfectly.

Logs from this particular run are belowโ€ฆ

2024-10-29 09:25:11.677 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-10-29 09:25:11.677 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say Called. Version v1.1.5 โ•‘
2024-10-29 09:25:11.678 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-10-29 09:25:11.678 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-10-29 09:25:11.679 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 09:25:11.679 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-10-29 09:25:11.679 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 09:25:11.680 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = ['media_player.darrells_office_homepod']
2024-10-29 09:25:11.680 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = /config/www/sounds/chime.mp3
2024-10-29 09:25:11.680 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = True
2024-10-29 09:25:11.680 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-10-29 09:25:11.680 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-10-29 09:25:11.680 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Test of TTS
2024-10-29 09:25:11.680 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = cloud
2024-10-29 09:25:11.681 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-10-29 09:25:11.681 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-10-29 09:25:11.681 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = True
2024-10-29 09:25:11.681 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-10-29 09:25:11.681 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = 0.5
2024-10-29 09:25:11.681 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-10-29 09:25:11.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-10-29 09:25:11.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-10-29 09:25:11.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.darrells_office_homepod
2024-10-29 09:25:11.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: apple_tv
2024-10-29 09:25:11.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.54
2024-10-29 09:25:11.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: 0.5
2024-10-29 09:25:11.684 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-10-29 09:25:11.684 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-10-29 09:25:11.684 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-10-29 09:25:11.685 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 09:25:11.685 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-10-29 09:25:11.685 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 09:25:11.685 DEBUG (MainThread) [custom_components.chime_tts] *** Checking Chime TTS audio cache ***
2024-10-29 09:25:11.700 DEBUG (MainThread) [custom_components.chime_tts] ...no cached audio found
2024-10-29 09:25:11.705 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/www/sounds/chime.mp3"...
2024-10-29 09:25:11.978 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.249s
2024-10-29 09:25:11.979 DEBUG (MainThread) [custom_components.chime_tts] - Attempting to retrieve TTS audio from cache...
2024-10-29 09:25:11.983 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/media/sounds/temp/chime_tts/dnbz02iu.mp3"...
2024-10-29 09:25:12.278 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 2.232s
2024-10-29 09:25:12.295 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to local folder: /media/sounds/temp/chime_tts/...
2024-10-29 09:25:12.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/qhzx78in.mp3
2024-10-29 09:25:12.947 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-10-29 09:25:12.947 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 3.931
2024-10-29 09:25:12.947 DEBUG (MainThread) [custom_components.chime_tts] * local_path = "/media/sounds/temp/chime_tts/qhzx78in.mp3"
2024-10-29 09:25:12.947 DEBUG (MainThread) [custom_components.chime_tts] * public_path = None
2024-10-29 09:25:12.947 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/qhzx78in.mp3"
2024-10-29 09:25:12.951 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage:
2024-10-29 09:25:12.952 DEBUG (MainThread) [custom_components.chime_tts] - key: "f7f213f7723a36850d44199cdfb893e99a9792cef6fa28104e41eb83fa0f37df"
2024-10-29 09:25:12.952 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'local_path': '/media/sounds/temp/chime_tts/qhzx78in.mp3', 'audio_duration': 3.931}"
2024-10-29 09:25:12.955 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 09:25:12.956 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Pre-Playback Actions โ”‚
2024-10-29 09:25:12.956 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 09:25:12.956 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Decreasing media_player.darrells_office_homepod's volume from 0.54 to 0.5
2024-10-29 09:25:12.956 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Setting media_player.darrells_office_homepod's volume to 0.5
2024-10-29 09:25:13.023 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - โœ”๏ธ media_player.darrells_office_homepod's volume now 0.5
2024-10-29 09:25:13.023 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 09:25:13.024 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Chime TTS playback โ”‚
2024-10-29 09:25:13.024 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 09:25:13.024 DEBUG (MainThread) [custom_components.chime_tts] 1 Regular media player detected:
2024-10-29 09:25:13.024 DEBUG (MainThread) [custom_components.chime_tts] - media_player.darrells_office_homepod
2024-10-29 09:25:13.024 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-10-29 09:25:13.024 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.darrells_office_homepod']
2024-10-29 09:25:13.024 DEBUG (MainThread) [custom_components.chime_tts] - announce: True
2024-10-29 09:25:13.024 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-10-29 09:25:13.024 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/qhzx78in.mp3
2024-10-29 09:25:13.028 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.931s for audio playback to complete...
2024-10-29 09:25:16.964 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 1 media_player isn't playing...
2024-10-29 09:25:16.964 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] โœ” media_player.darrells_office_homepod
2024-10-29 09:25:16.964 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 09:25:16.964 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Post-Playback Actions โ”‚
2024-10-29 09:25:16.964 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 09:25:16.965 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Increasing media_player.darrells_office_homepod's volume from 0.5 to 0.54
2024-10-29 09:25:16.965 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Setting media_player.darrells_office_homepod's volume to 0.54
2024-10-29 09:25:16.983 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - โœ”๏ธ media_player.darrells_office_homepod's volume now 0.54
2024-10-29 09:25:16.983 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 09:25:16.983 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚โ”€โ”€โ”€โ”€ Chime TTS Say Completed in 5.3 s โ”€โ”€โ”€โ”€โ”‚
2024-10-29 09:25:16.983 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 09:25:24.072 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.play_media (c:01JBCHGYJ0HFWVNJ9M32ND2HM0): entity_id=['media_player.darrells_office_homepod'], announce=True, extra=, media_type=music, media_id=media-source://media_source/local/sounds/temp/chime_tts/qhzx78in.mp3>

Hi Darrell,

I meant to ask you to please try playing the media_content_id value, not the file path. Assuming the file is still on your filesystem, please test the following action:

action: media_player.play_media
target:
  entity_id: darrells_office_homepod
data:
  media_content_id: media-source://media_source/local/sounds/temp/chime_tts/qhzx78in.mp3
  media_content_type: music

Mea Culpa. Sorry.

OK, did the following and it threw an error (latest log entries below - I think they refer to the issue)

First occurred: 10:11:09 AM (2 occurrences)
Last logged: 10:11:55 AM

[547204849312] Error handling message: Unknown error (unknown_error) Darrell Earnshaw from 192.168.86.23 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 816, in handle_execute_script
    script_result = await script_obj.async_run(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1795, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 463, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 527, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 557, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2761, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/apple_tv/media_player.py", line 345, in async_play_media
    await self.atv.stream.stream_file(media_id)
  File "/usr/local/lib/python3.12/site-packages/pyatv/core/facade.py", line 374, in stream_file
    await self.relay("stream_file")(
  File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/__init__.py", line 360, in stream_file
    audio_file = await open_source(
                 ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/audio_source.py", line 730, in open_source
    return await InternetSource.open(source, sample_rate, channels, sample_size)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyatv/protocols/raop/audio_source.py", line 598, in open
    stream_generator = await loop.run_in_executor(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/miniaudio.py", line 1270, in stream_any
    raise DecodeError("failed to init decoder", result)
miniaudio.DecodeError: ('failed to init decoder', -1)
Logs
Search logs
chime_tts
Home Assistant Core
Home Assistant Core
2024-10-29 11:32:23.393 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration chime_tts which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-10-29 11:32:27.111 WARNING (ImportExecutor_0) [homeassistant.components.media_player.const] MEDIA_TYPE_MUSIC was used from chime_tts, this is a deprecated constant which will be removed in HA Core 2025.10. Use MediaType.MUSIC instead, please report it to the author of the 'chime_tts' custom integration
2024-10-29 11:34:15.713 ERROR (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Media file "%s" is not in a local media directory. See https://www.home-assistant.io/more-info/local-media/setup-media/
2024-10-29 11:34:15.714 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Unable to generate public audio file
2024-10-29 11:34:15.714 WARNING (MainThread) [custom_components.chime_tts] Check that the folder path in the configuration for `chime_tts.say_url` is within the public "www" folder or the local media folder
2024-10-29 11:43:45.430 ERROR (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Media file "%s" is not in a local media directory. See https://www.home-assistant.io/more-info/local-media/setup-media/
2024-10-29 11:43:45.433 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Unable to generate public audio file
2024-10-29 11:43:45.433 WARNING (MainThread) [custom_components.chime_tts] Check that the folder path in the configuration for `chime_tts.say_url` is within the public "www" folder or the local media folder
2024-10-29 12:13:57.741 ERROR (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Media file "%s" is not in a local media directory. See https://www.home-assistant.io/more-info/local-media/setup-media/
2024-10-29 12:13:57.742 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Unable to generate public audio file
2024-10-29 12:13:57.742 WARNING (MainThread) [custom_components.chime_tts] Check that the folder path in the configuration for `chime_tts.say_url` is within the public "www" folder or the local media folder
2024-10-29 12:59:36.691 ERROR (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Media file "%s" is not in a local media directory. See https://www.home-assistant.io/more-info/local-media/setup-media/
2024-10-29 12:59:36.692 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Unable to generate public audio file
2024-10-29 12:59:36.692 WARNING (MainThread) [custom_components.chime_tts] Check that the folder path in the configuration for `chime_tts.say_url` is within the public "www" folder or the local media folder
2024-10-29 13:05:01.735 ERROR (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Media file "%s" is not in a local media directory. See https://www.home-assistant.io/more-info/local-media/setup-media/
2024-10-29 13:05:01.736 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Unable to generate public audio file
2024-10-29 13:05:01.736 WARNING (MainThread) [custom_components.chime_tts] Check that the folder path in the configuration for `chime_tts.say_url` is within the public "www" folder or the local media folder
2024-10-29 13:08:14.217 ERROR (MainThread) [custom_components.chime_tts.helpers.media_player_helper] Media file "%s" is not in a local media directory. See https://www.home-assistant.io/more-info/local-media/setup-media/
2024-10-29 13:08:14.218 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Unable to generate public audio file
2024-10-29 13:08:14.218 WARNING (MainThread) [custom_components.chime_tts] Check that the folder path in the configuration for `chime_tts.say_url` is within the public "www" folder or the local media folder
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say URL Called. Version v1.1.5 โ•‘
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = []
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = classical
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * end_chime_path = glockenspiel
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 250.0
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Hey there! Just a quick heads-up: the dogs are outside, and Iโ€™m starting to worry about Zoey. I mean, if she thinks she can outsmart a coyote, she might be in for a rude awakening. Letโ€™s rescue them from their brave little adventure and bring them back inside!
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = amazon_polly
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array = []
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-10-29 14:10:59.007 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 14:10:59.008 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/classical.mp3
2024-10-29 14:10:59.008 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/classical.mp3"...
2024-10-29 14:10:59.093 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 3.038s
2024-10-29 14:10:59.094 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-10-29 14:10:59.094 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'amazon_polly'
2024-10-29 14:10:59.094 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Hey there! Just a quick heads-up: the dogs are outside, and Iโ€™m starting to worry about Zoey. I mean, if she thinks she can outsmart a coyote, she might be in for a rude awakening. Letโ€™s rescue them from their brave little adventure and bring them back inside!'
2024-10-29 14:10:59.094 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-10-29 14:10:59.094 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-10-29 14:10:59.094 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-10-29 14:11:01.107 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 2.01s
2024-10-29 14:11:01.135 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/glockenspiel.mp3
2024-10-29 14:11:01.135 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/glockenspiel.mp3"...
2024-10-29 14:11:01.200 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.128s
2024-10-29 14:11:01.201 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to public folder: /media/temp/chime_tts/announcements/...
2024-10-29 14:11:01.372 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/temp/chime_tts/announcements/a_vh76ho.mp3
2024-10-29 14:11:01.450 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-10-29 14:11:01.450 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 20.582
2024-10-29 14:11:01.450 DEBUG (MainThread) [custom_components.chime_tts] * local_path = None
2024-10-29 14:11:01.450 DEBUG (MainThread) [custom_components.chime_tts] * public_path = None
2024-10-29 14:11:01.450 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/local/temp/chime_tts/announcements/a_vh76ho.mp3"
2024-10-29 14:11:01.450 DEBUG (MainThread) [custom_components.chime_tts] Final URL = None
2024-10-29 14:11:01.451 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 14:11:01.451 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚โ”€โ”€โ”€โ”€ Chime TTS Say URL Completed in %s 2.44 s โ”€โ”€โ”€โ”€โ”‚
2024-10-29 14:11:01.451 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 14:11:01.451 WARNING (MainThread) [homeassistant.components.input_text] Invalid value: {'url': None, 'media_content_id': 'media-source://media_source/local/temp/chime_tts/announcements/a_vh76ho.mp3', 'duration': 20.582, 'success': True} (length range 0 - 100)

Thank you for providing me with the additional information :+1:

I think the issue lies with the folder path you have configured for the chime_tts.say action:
Screenshot 2024-10-29 at 20.22.59
Please try changing this path to a publicly accessible path (eg: /config/www/temp/chime_tts/announcements).

If you are still having issues I suggest you upgrade to the latest beta release and then let me know if the problem persists.

Hi Darrel, I think weโ€™re getting closer!

When running the media_player.player_media action, if you were able to hear the file by using the file path, but not the media_content_id, the problem might be that you donโ€™t have the media folder listed in your configuration.yaml file.

Please check if you have a media directory mapped under homeassistant: eg:

homeassistant:
  media_dirs:
    local: /media

Thanks, Nim.

Yep, added that, but the symptoms are still the same. I both reloaded the YAML configurations and restarted HA.

Hang on a minuteโ€ฆ does the term: local: /media refer to config/www/media? If so, my mp3 file isnโ€™t in that directory, it is in /config/www/sounds.

This might be the issue! The local key in this yaml example maps to /media.

You need to make sure that the temporary media folder path in the Chime TTS configuration is a subfolder of a media folder, (eg: /media).

Hmmm. forgive my ignorance, but Iโ€™m a little lost here.

Currently, the temporary files are stored in: /root/media/sounds/temp/chime_tts (as verified using my SSL window)

So, I need to change this

to what?

Simply drop the โ€œ/mediaโ€ part and just use โ€œ/sounds/temp/chime_ttsโ€, (working on the assumption that โ€œlocalโ€ now maps directly to /root/media) ?

I guess Iโ€™m missing a key concept here.

No, this path is for downloaded chimes. I am talking about the temporary folder path:

Sorry, I sent the wrong screen shot (well, I took a screen shot of the wrong entry). Correct one below.

OK, now Iโ€™m really going down the rabbit hole.

In my simple mind, the path listed above seems to be correct, as (a) the generated mp3 files are actually there, and (b) we know that some (i.e. Sonos) files play OK

So, now Iโ€™ve added the โ€œlocal: /mediaโ€ entry to the config file, where is that pointing? /root/media or /root/config/www/media, or โ€ฆ?

As I said, really confused now

Youโ€™ve understood correctly. The local media folder maps to /media

I am not sure in what the issue is. My HomePod plays nicely, and our configurations appear to be very similar.

At this stage Iโ€™d suggest to delete the integration and reinstall it and try again.

Its creating the file at that location but not creating the URL to it.

Can you share the debug logs?