nimroddolev / chime_tts

A custom Home Assistant integration to play combined audio files before and/or after text-to-speech (TTS) messages
https://nimroddolev.github.io/chime_tts/
MIT License
196 stars 14 forks source link

Use public URL path with cast and Sonos media_players instead of the media content id #164

Closed strutings closed 4 months ago

strutings commented 4 months ago

System Health details

`## System Information

version core-2024.7.1
installation_type Home Assistant Core
dev false
hassio false
docker false
user homeassistant
virtualenv true
python_version 3.12.2
os_name Linux
os_version 6.1.0-10-amd64
arch x86_64
timezone Europe/Oslo
config_dir /home/homeassistant/.homeassistant
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1476 Downloaded Repositories | 76 HACS Data | ok
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 11. februar 2025 kl. 01:00 relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | eu-central-1-8.ui.nabu.casa certificate_status | ready instance_id | 07060d1f46034d3891b0a3025373b0fc can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 17 -- | -- resources | 38 views | 56 mode | storage
Recorder oldest_recorder_run | 7. mai 2024 kl. 16:52 -- | -- current_recorder_run | 8. juli 2024 kl. 09:19 estimated_db_size | 17735.95 MiB database_engine | mysql database_version | 10.11.6
Spotify api_endpoint_reachable | ok -- | --
` ### Checklist - [X] I have enabled debug logging for my installation. - [X] I have filled out the issue template to the best of my ability. - [X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue). - [X] This issue is not a duplicate issue of currently [previous issues](https://github.com/nimroddolev/chime_tts/issues?q=is%3Aissue+label%3A%22Bug%22+).. ### Describe the issue `ERROR (Thread-11) [homeassistant.components.cast.media_player] Failed to cast media http://10.0.0.XXX:8123/**media/media/**sounds/temp/chime_tts/7ougo45g.mp3?authSig=SIG_REMOVED from internal_url (http://10.0.0.XXX:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address ` Seems like it's adding media to the adress twice, even the config path is pointing to the correct path. ### Reproduction steps `service: chime_tts.say data: chime_path: ba_dum_tss message: testing cache: false announce: true target: entity_id: media_player.googlehome6815` Configuration: `Chime TTS Configuration Configure the chime_tts.say and chime_tts.say_url services and add custom chime mp3 paths: Service call timeout (in seconds) 60 Default TTS platform openai_tts Default offset value (in milliseconds) between chimes & TTS audio 450 Fade transition (in milliseconds) when fading currently playing audio for `announce` and `fade_audio` 500 Folder path for custom chime audio files Media folder media Folder path for downloaded chime audio files media/sounds/temp/chime_tts/chimes/ Folder path for temporary TTS audio mp3 files media/sounds/temp/chime_tts/ Folder path for Chime TTS mp3s generated by `chime_tts.say_url` www/chime_tts/ ` ### Debug logs ```text 2024-07-08T09:46:10.893903+02:00 odin hass[3286511]: 2024-07-08 09:46:10.878 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.3 ----- 2024-07-08T09:46:10.894116+02:00 odin hass[3286511]: 2024-07-08 09:46:10.878 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue 2024-07-08T09:46:10.894396+02:00 odin hass[3286511]: 2024-07-08 09:46:10.879 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.3 ----- 2024-07-08T09:46:10.894628+02:00 odin hass[3286511]: 2024-07-08 09:46:10.881 INFO (MainThread) [custom_components.chime_tts.helpers.media_player] Turning on "media_player.googlehome6815"... 2024-07-08T09:46:10.894840+02:00 odin hass[3286511]: 2024-07-08 09:46:10.882 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters ----- 2024-07-08T09:46:10.895082+02:00 odin hass[3286511]: 2024-07-08 09:46:10.883 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = ['media_player.googlehome6815'] 2024-07-08T09:46:10.895277+02:00 odin hass[3286511]: 2024-07-08 09:46:10.884 INFO (SyncWorker_58) [pychromecast] Starting app CC1AD845 2024-07-08T09:46:10.895639+02:00 odin hass[3286511]: 2024-07-08 09:46:10.885 INFO (SyncWorker_58) [pychromecast.controllers] Receiver:Launching app CC1AD845 2024-07-08T09:46:10.895970+02:00 odin hass[3286511]: 2024-07-08 09:46:10.883 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = ba_dum_tss 2024-07-08T09:46:10.896220+02:00 odin hass[3286511]: 2024-07-08 09:46:10.885 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False 2024-07-08T09:46:10.896486+02:00 odin hass[3286511]: 2024-07-08 09:46:10.886 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0 2024-07-08T09:46:10.896731+02:00 odin hass[3286511]: 2024-07-08 09:46:10.886 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0 2024-07-08T09:46:10.896929+02:00 odin hass[3286511]: 2024-07-08 09:46:10.886 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = testing 2024-07-08T09:46:10.897209+02:00 odin hass[3286511]: 2024-07-08 09:46:10.886 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0 2024-07-08T09:46:10.897690+02:00 odin hass[3286511]: 2024-07-08 09:46:10.886 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0 2024-07-08T09:46:10.897978+02:00 odin hass[3286511]: 2024-07-08 09:46:10.887 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = True 2024-07-08T09:46:10.898250+02:00 odin hass[3286511]: 2024-07-08 09:46:10.887 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False 2024-07-08T09:46:10.898891+02:00 odin hass[3286511]: 2024-07-08 09:46:10.887 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1 2024-07-08T09:46:10.899222+02:00 odin hass[3286511]: 2024-07-08 09:46:10.887 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False 2024-07-08T09:46:10.899546+02:00 odin hass[3286511]: 2024-07-08 09:46:10.887 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False 2024-07-08T09:46:10.899787+02:00 odin hass[3286511]: 2024-07-08 09:46:10.887 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array: 2024-07-08T09:46:10.900029+02:00 odin hass[3286511]: 2024-07-08 09:46:10.888 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.googlehome6815 2024-07-08T09:46:10.900268+02:00 odin hass[3286511]: 2024-07-08 09:46:10.888 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: cast 2024-07-08T09:46:10.900507+02:00 odin hass[3286511]: 2024-07-08 09:46:10.888 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: -1.0 2024-07-08T09:46:10.900820+02:00 odin hass[3286511]: 2024-07-08 09:46:10.888 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0 2024-07-08T09:46:10.901059+02:00 odin hass[3286511]: 2024-07-08 09:46:10.888 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False 2024-07-08T09:46:10.901303+02:00 odin hass[3286511]: 2024-07-08 09:46:10.889 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False 2024-07-08T09:46:10.901519+02:00 odin hass[3286511]: 2024-07-08 09:46:10.889 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False 2024-07-08T09:46:10.901746+02:00 odin hass[3286511]: 2024-07-08 09:46:10.889 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /home/homeassistant/.homeassistant/custom_components/chime_tts/mp3s/ba_dum_tss.mp3 2024-07-08T09:46:10.901913+02:00 odin hass[3286511]: 2024-07-08 09:46:10.889 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/home/homeassistant/.homeassistant/custom_components/chime_tts/mp3s/ba_dum_tss.mp3"... 2024-07-08T09:46:11.350235+02:00 odin hass[3286511]: 2024-07-08 09:46:11.344 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 2.403s 2024-07-08T09:46:11.357721+02:00 odin hass[3286511]: 2024-07-08 09:46:11.355 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - Using default TTS platform: 'openai_tts' 2024-07-08T09:46:11.357931+02:00 odin hass[3286511]: 2024-07-08 09:46:11.355 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters: 2024-07-08T09:46:11.358008+02:00 odin hass[3286511]: 2024-07-08 09:46:11.356 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'openai_tts' 2024-07-08T09:46:11.358231+02:00 odin hass[3286511]: 2024-07-08 09:46:11.356 DEBUG (MainThread) [custom_components.chime_tts] * message = 'testing' 2024-07-08T09:46:11.358479+02:00 odin hass[3286511]: 2024-07-08 09:46:11.356 DEBUG (MainThread) [custom_components.chime_tts] * cache = False 2024-07-08T09:46:11.358556+02:00 odin hass[3286511]: 2024-07-08 09:46:11.356 DEBUG (MainThread) [custom_components.chime_tts] * language = None 2024-07-08T09:46:11.358629+02:00 odin hass[3286511]: 2024-07-08 09:46:11.356 DEBUG (MainThread) [custom_components.chime_tts] * options = {} 2024-07-08T09:46:11.785005+02:00 odin hass[3286511]: 2024-07-08 09:46:11.779 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 430.0ms 2024-07-08T09:46:11.785764+02:00 odin hass[3286511]: 2024-07-08 09:46:11.784 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to folder: /home/homeassistant/.homeassistant/media/sounds/temp/chime_tts/... 2024-07-08T09:46:11.785896+02:00 odin hass[3286511]: 2024-07-08 09:46:11.784 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Creating audio folder: /home/homeassistant/.homeassistant/media/sounds/temp/chime_tts/ 2024-07-08T09:46:12.112731+02:00 odin hass[3286511]: 2024-07-08 09:46:12.111 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /home/homeassistant/.homeassistant/media/sounds/temp/chime_tts/7ougo45g.mp3 2024-07-08T09:46:12.552030+02:00 odin hass[3286511]: 2024-07-08 09:46:12.547 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated: 2024-07-08T09:46:12.553520+02:00 odin hass[3286511]: 2024-07-08 09:46:12.547 DEBUG (MainThread) [custom_components.chime_tts] * audio_duration = 3.405 2024-07-08T09:46:12.553691+02:00 odin hass[3286511]: 2024-07-08 09:46:12.547 DEBUG (MainThread) [custom_components.chime_tts] * local_path = "/home/homeassistant/.homeassistant/media/sounds/temp/chime_tts/7ougo45g.mp3" 2024-07-08T09:46:12.553769+02:00 odin hass[3286511]: 2024-07-08 09:46:12.547 DEBUG (MainThread) [custom_components.chime_tts] * public_path = None 2024-07-08T09:46:12.553867+02:00 odin hass[3286511]: 2024-07-08 09:46:12.547 DEBUG (MainThread) [custom_components.chime_tts] * media_content_id = "media-source://media_source/media/sounds/temp/chime_tts/7ougo45g.mp3" 2024-07-08T09:46:12.553955+02:00 odin hass[3286511]: 2024-07-08 09:46:12.547 DEBUG (MainThread) [custom_components.chime_tts] **************************** 2024-07-08T09:46:12.554329+02:00 odin hass[3286511]: 2024-07-08 09:46:12.547 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions *** 2024-07-08T09:46:12.554440+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] **************************** 2024-07-08T09:46:12.554525+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] ************************** 2024-07-08T09:46:12.554610+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback *** 2024-07-08T09:46:12.554685+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] ************************** 2024-07-08T09:46:12.554758+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] 1 Regular media player detected: 2024-07-08T09:46:12.554842+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] - media_player.googlehome6815 2024-07-08T09:46:12.554927+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data: 2024-07-08T09:46:12.555024+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.googlehome6815'] 2024-07-08T09:46:12.555111+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] - announce: True 2024-07-08T09:46:12.555200+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music 2024-07-08T09:46:12.555342+02:00 odin hass[3286511]: 2024-07-08 09:46:12.548 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/media/sounds/temp/chime_tts/7ougo45g.mp3 2024-07-08T09:46:12.555459+02:00 odin hass[3286511]: 2024-07-08 09:46:12.551 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.405s for audio playback to complete... 2024-07-08T09:46:13.052605+02:00 odin hass[3286511]: 2024-07-08 09:46:13.045 ERROR (Thread-11) [homeassistant.components.cast.media_player] Failed to cast media http://10.0.0.186:8123/media/media/sounds/temp/chime_tts/7ougo45g.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI4NDk0OTZiNGM3ZDU0N2RlYTYyNWIzODkyYTMxODE2OCIsInBhdGgiOiIvbWVkaWEvbWVkaWEvc291bmRzL3RlbXAvY2hpbWVfdHRzLzdvdWdvNDVnLm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTcyMDQyNDc3MiwiZXhwIjoxNzIwNTExMTcyfQ.BBsCYCAu4-XYZwhkaXx9h4r8ACrtPIwk1w0EMlnrnJE from internal_url (http://10.0.0.186:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address 2024-07-08T09:46:15.959535+02:00 odin hass[3286511]: 2024-07-08 09:46:15.957 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 1 media_player isn't playing... 2024-07-08T09:46:15.959852+02:00 odin hass[3286511]: 2024-07-08 09:46:15.957 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] ✔ media_player.googlehome6815 2024-07-08T09:46:15.960039+02:00 odin hass[3286511]: 2024-07-08 09:46:15.958 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 5.08 s ----- ``` ### Diagnostics dump _No response_
nimroddolev commented 4 months ago

Hi @strutings. Sorry you've been having issues, and thank you for providing the debug log messages and your configuration.

From the debug logs it appear that your cast media_player requires publicly available MP3 addresses:

2024-07-08T09:46:13.052605+02:00 odin hass[3286511]: 2024-07-08 09:46:13.045 ERROR (Thread-11) [homeassistant.components.cast.media_player] Failed to cast media http://10.0.0.186:8123/media/media/sounds/temp/chime_tts/7ougo45g.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI4NDk0OTZiNGM3ZDU0N2RlYTYyNWIzODkyYTMxODE2OCIsInBhdGgiOiIvbWVkaWEvbWVkaWEvc291bmRzL3RlbXAvY2hpbWVfdHRzLzdvdWdvNDVnLm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTcyMDQyNDc3MiwiZXhwIjoxNzIwNTExMTcyfQ.BBsCYCAu4-XYZwhkaXx9h4r8ACrtPIwk1w0EMlnrnJE from internal_url (http://10.0.0.186:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

Can you please try changing your temporary folder path to a public-facing folder (eg: /config/www/chime_tts/temp/) and report back whether this fixes the issue?

EDIT: After reviewing the documentation for Google Cast, it appear that media_player.play_media requires the filepath (URL) and not the media content id.

Can you please verify that using the URL returned by chime_tts.say_url works with your cast media_player when calling media_player.play_meda?

If so I will add a fix so that Chime TTS will use the public URL path with cast media_players instead of the media content id.

strutings commented 4 months ago

Hi @strutings. Sorry you've been having issues, and thank you for providing the debug log messages and your configuration.

From the debug logs it appear that your cast media_player requires publicly available MP3 addresses:

2024-07-08T09:46:13.052605+02:00 odin hass[3286511]: 2024-07-08 09:46:13.045 ERROR (Thread-11) [homeassistant.components.cast.media_player] Failed to cast media http://10.0.0.186:8123/media/media/sounds/temp/chime_tts/7ougo45g.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI4NDk0OTZiNGM3ZDU0N2RlYTYyNWIzODkyYTMxODE2OCIsInBhdGgiOiIvbWVkaWEvbWVkaWEvc291bmRzL3RlbXAvY2hpbWVfdHRzLzdvdWdvNDVnLm1wMyIsInBhcmFtcyI6W10sImlhdCI6MTcyMDQyNDc3MiwiZXhwIjoxNzIwNTExMTcyfQ.BBsCYCAu4-XYZwhkaXx9h4r8ACrtPIwk1w0EMlnrnJE from internal_url (http://10.0.0.186:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

~Can you please try changing your temporary folder path to a public-facing folder (eg: /config/www/chime_tts/temp/) and report back whether this fixes the issue?~

EDIT: After reviewing the documentation for Google Cast, it appear that media_player.play_media requires the filepath (URL) and not the media content id.

Can you please verify that using the URL returned by chime_tts.say_url works with your cast media_player when calling media_player.play_meda?

If so I will add a fix so that Chime TTS will use the public URL path with cast media_players instead of the media content id.

Changed the public folder to www/sounds/temp/chime_tts/chimes/ and successfully played the media file, so it seems like you've right that it's the URL path required

service: media_player.play_media target: entity_id: media_player.ikealampe data: media_content_id: http://10.0.0.186:8123/local/sounds/temp/chime_tts/wdbleu4j.mp3 media_content_type: music announce: true

EDIT: It's also the same behavior when using platform: sonos

nimroddolev commented 4 months ago

Great! I will include a fix in the next beta release and let you know when it's available for testing 👍

nimroddolev commented 4 months ago

I have implemented a permanent fix in a new beta release, v1.1.4-beta4.

To install the new beta version:

  1. Open the Chime TTS repository in HACS
  2. Click on the button in the top right
  3. Select the ↻ Redownload option
  4. Enable the Show beta versions option (it may take a moment to update the list)
  5. Select version v1.1.4-beta4 from the updated version drop-down list
  6. Restart Home Assistant
strutings commented 4 months ago

2024-07-10T10:36:07.690447+02:00 odin hass[3349181]: 2024-07-10 10:36:07.681 INFO (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Executing step call service 2024-07-10T10:36:07.693789+02:00 odin hass[3349181]: 2024-07-10 10:36:07.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╔════════════════════════════════════════════╗ 2024-07-10T10:36:07.694193+02:00 odin hass[3349181]: 2024-07-10 10:36:07.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ║ Chime TTS Say Called. Version v1.1.4-beta4 ║ 2024-07-10T10:36:07.694909+02:00 odin hass[3349181]: 2024-07-10 10:36:07.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╚════════════════════════════════════════════╝ 2024-07-10T10:36:07.695556+02:00 odin hass[3349181]: 2024-07-10 10:36:07.682 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue 2024-07-10T10:36:07.695752+02:00 odin hass[3349181]: 2024-07-10 10:36:07.686 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭────────────────────╮ 2024-07-10T10:36:07.696447+02:00 odin hass[3349181]: 2024-07-10 10:36:07.686 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ General Parameters │ 2024-07-10T10:36:07.697132+02:00 odin hass[3349181]: 2024-07-10 10:36:07.686 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰────────────────────╯ 2024-07-10T10:36:07.697662+02:00 odin hass[3349181]: 2024-07-10 10:36:07.687 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] entity_ids = ['media_player.ikealampe'] 2024-07-10T10:36:07.700412+02:00 odin hass[3349181]: 2024-07-10 10:36:07.687 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] chime_path = bells_2 2024-07-10T10:36:07.701411+02:00 odin hass[3349181]: 2024-07-10 10:36:07.687 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] cache = True 2024-07-10T10:36:07.701643+02:00 odin hass[3349181]: 2024-07-10 10:36:07.687 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] offset = 450.0 2024-07-10T10:36:07.701818+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] final_delay = 0.0 2024-07-10T10:36:07.702857+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] message = testing 2024-07-10T10:36:07.703293+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_platform = cloud 2024-07-10T10:36:07.703791+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_speed = 100.0 2024-07-10T10:36:07.703971+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] tts_pitch = 0 2024-07-10T10:36:07.704110+02:00 odin hass[3349181]: 2024-07-10 10:36:07.688 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce = True 2024-07-10T10:36:07.707560+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] fade_audio = False 2024-07-10T10:36:07.707734+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] volume_level = -1 2024-07-10T10:36:07.707834+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join_players = False 2024-07-10T10:36:07.707910+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] unjoin_players = False 2024-07-10T10:36:07.707995+02:00 odin hass[3349181]: 2024-07-10 10:36:07.689 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array: 2024-07-10T10:36:07.708097+02:00 odin hass[3349181]: 2024-07-10 10:36:07.690 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.ikealampe 2024-07-10T10:36:07.708188+02:00 odin hass[3349181]: 2024-07-10 10:36:07.690 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: sonos 2024-07-10T10:36:07.708275+02:00 odin hass[3349181]: 2024-07-10 10:36:07.690 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: 0.1 2024-07-10T10:36:07.708362+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0 2024-07-10T10:36:07.708721+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: True 2024-07-10T10:36:07.708799+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: True 2024-07-10T10:36:07.708863+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: True 2024-07-10T10:36:07.708944+02:00 odin hass[3349181]: 2024-07-10 10:36:07.691 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭─────────────────╮ 2024-07-10T10:36:07.709031+02:00 odin hass[3349181]: 2024-07-10 10:36:07.692 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ Preparing Audio │ 2024-07-10T10:36:07.709100+02:00 odin hass[3349181]: 2024-07-10 10:36:07.692 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰─────────────────╯ 2024-07-10T10:36:07.709167+02:00 odin hass[3349181]: 2024-07-10 10:36:07.692 DEBUG (MainThread) [custom_components.chime_tts] Checking Chime TTS audio cache 2024-07-10T10:36:07.709235+02:00 odin hass[3349181]: 2024-07-10 10:36:07.698 DEBUG (MainThread) [custom_components.chime_tts] ...cached audio found 2024-07-10T10:36:07.709328+02:00 odin hass[3349181]: 2024-07-10 10:36:07.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭────────────────────╮ 2024-07-10T10:36:07.709401+02:00 odin hass[3349181]: 2024-07-10 10:36:07.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │ Chime TTS playback │ 2024-07-10T10:36:07.709467+02:00 odin hass[3349181]: 2024-07-10 10:36:07.698 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰────────────────────╯ 2024-07-10T10:36:07.709550+02:00 odin hass[3349181]: 2024-07-10 10:36:07.699 WARNING (MainThread) [custom_components.chime_tts] Error calling media_player.play_media service: No media content id found 2024-07-10T10:36:07.709618+02:00 odin hass[3349181]: 2024-07-10 10:36:07.699 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.385s for audio playback to complete... 2024-07-10T10:36:11.092648+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 0 media_players aren't playing... 2024-07-10T10:36:11.093552+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts] - Timed out waiting for playback to complete 2024-07-10T10:36:11.093795+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╭──────────────────────────────────────────╮ 2024-07-10T10:36:11.094270+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] │──── Chime TTS Say Completed in 3.4 s ────│ 2024-07-10T10:36:11.094490+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ╰──────────────────────────────────────────╯ 2024-07-10T10:36:11.094786+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Service call completed successfully 2024-07-10T10:36:11.094985+02:00 odin hass[3349181]: 2024-07-10 10:36:11.089 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Queue now empty

Seems like it's still the same. Using setup 'media' and paths www/sounds/temp/chime_tts/chimes/ and www/sounds/temp/chime_tts/

strutings commented 4 months ago

Any progress on this?

strutings commented 4 months ago

Still struggling with this. The public_url is wrong and probably this causing the same error for Sonos as well.

ERROR (Thread-16) [homeassistant.components.cast.media_player] Failed to cast media http://10.0.0.186:8123/home/homeassistant/.homeassistant/local/chime_tts/jedciv2h.mp3?authSig=kjhsfkjahdsgfsadgf from internal_url (http://10.0.0.186:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

The correct url should be http://10.0.0.186:8123/local/chime_tts/jedciv2h.mp3

When I change local url in HA settings to nabu casa url, it throws Unable to find public url error..

strutings commented 4 months ago

Installed v. 1.1.3 and added correct path to both configuration.yaml and chime config. Now it's working again.