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

Home Assistant Core
2024-10-29 17:05:36.663 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 17:09:17.411 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Public audio file not found on filesystem: http://192.168.86.193:8123/local/temp/chime_tts/announcements/9mc11iyk.mp3
2024-10-29 17:09:17.411 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 17:13:20.846 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Public audio file not found on filesystem: http://192.168.86.193:8123/local/temp/chime_tts/announcements/sd4m22n6.mp3
2024-10-29 17:13:20.846 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 17:48:23.654 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Public audio file not found on filesystem: http://192.168.86.193:8123/local/temp/chime_tts/announcements/u66e5pkk.mp3
2024-10-29 17:48:23.654 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 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say URL Called. Version v1.1.6-beta5 โ•‘
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = []
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = classical
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * end_chime_path = glockenspiel
2024-10-29 17:51:06.096 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 250.0
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Hey there! Just a heads-up: the dogs are outside, and I think Zippy might be trying to negotiate with a snake for a game of fetch. Letโ€™s let them back in before they start a wildlife conference out there!
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = amazon_polly
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array = []
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/classical.mp3
2024-10-29 17:51:06.097 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/classical.mp3"...
2024-10-29 17:51:06.160 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 3.038s
2024-10-29 17:51:06.161 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-10-29 17:51:06.161 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'amazon_polly'
2024-10-29 17:51:06.161 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Hey there! Just a heads-up: the dogs are outside, and I think Zippy might be trying to negotiate with a snake for a game of fetch. Letโ€™s let them back in before they start a wildlife conference out there!'
2024-10-29 17:51:06.161 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-10-29 17:51:06.161 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-10-29 17:51:06.161 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-10-29 17:51:06.906 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 750.0ms
2024-10-29 17:51:06.928 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/glockenspiel.mp3
2024-10-29 17:51:06.928 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/glockenspiel.mp3"...
2024-10-29 17:51:06.994 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.128s
2024-10-29 17:51:06.995 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to public folder: /config/www/temp/chime_tts/announcements/...
2024-10-29 17:51:07.149 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/temp/chime_tts/announcements/zg50e7o1.mp3
2024-10-29 17:51:07.223 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Public audio file not found on filesystem: http://192.168.86.193:8123/local/temp/chime_tts/announcements/zg50e7o1.mp3
2024-10-29 17:51:07.223 DEBUG (MainThread) [custom_components.chime_tts] Final URL = None
2024-10-29 17:51:07.223 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 17:51:07.223 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚โ”€โ”€โ”€โ”€ Chime TTS Say URL Completed in 1.13 s โ”€โ”€โ”€โ”€โ”‚
2024-10-29 17:51:07.223 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 17:51:07.223 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 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say URL Called. Version v1.1.6-beta5 โ•‘
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = []
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = classical
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * end_chime_path = glockenspiel
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 250.0
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Hey there! Just a heads up, the dogs are waiting to come back inside. I think theyโ€™re starting to reconsider their life choices out there. Zoey looks particularly worriedโ€”maybe she spotted a coyote or two eyeing her like sheโ€™s a tasty snack. Letโ€™s get them in before they start negotiating their freedom!
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = amazon_polly
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array = []
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-10-29 17:52:18.038 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 17:52:18.039 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/classical.mp3
2024-10-29 17:52:18.039 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/classical.mp3"...
2024-10-29 17:52:18.105 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 3.038s
2024-10-29 17:52:18.107 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-10-29 17:52:18.107 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'amazon_polly'
2024-10-29 17:52:18.107 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Hey there! Just a heads up, the dogs are waiting to come back inside. I think theyโ€™re starting to reconsider their life choices out there. Zoey looks particularly worriedโ€”maybe she spotted a coyote or two eyeing her like sheโ€™s a tasty snack. Letโ€™s get them in before they start negotiating their freedom!'
2024-10-29 17:52:18.107 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-10-29 17:52:18.107 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-10-29 17:52:18.107 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-10-29 17:52:19.209 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 1.1s
2024-10-29 17:52:19.236 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/glockenspiel.mp3
2024-10-29 17:52:19.236 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/glockenspiel.mp3"...
2024-10-29 17:52:19.305 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 1.128s
2024-10-29 17:52:19.306 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to public folder: /config/www/temp/chime_tts/announcements/...
2024-10-29 17:52:19.490 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /config/www/temp/chime_tts/announcements/18hk_sjx.mp3
2024-10-29 17:52:19.570 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Public audio file not found on filesystem: http://192.168.86.193:8123/local/temp/chime_tts/announcements/18hk_sjx.mp3
2024-10-29 17:52:19.570 DEBUG (MainThread) [custom_components.chime_tts] Final URL = None
2024-10-29 17:52:19.570 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-29 17:52:19.570 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚โ”€โ”€โ”€โ”€ Chime TTS Say URL Completed in 1.53 s โ”€โ”€โ”€โ”€โ”‚
2024-10-29 17:52:19.570 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-29 17:52:19.570 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

Hey @Nimrod_Dolev! Sorry for going MIA. I am dealing with bedbugs I just found (EW!) and while dealing with that drama, my PC wouldnโ€™t boot up after simply restarting. Turns out, it was because of a stupid MicroSD card I had in a reader - I didnโ€™t think anything about it cause thereโ€™s nothing on it. But apparently my PC didnโ€™t like the card.

Anyway, good newsโ€ฆ sort of.

When I followed your steps, I ran the automation, the mp3 played as expected, and without any Simon Says error. We really should find this guy and bop him over the head once or twice. KIDDING! I donโ€™t condone violence! But man does he ever get on my nerves!

That said, when I try running the automation without Cache set to true, I get the Simon Says error message.

Here are the logs, for the several times I ran it, with and without cache set to true:

https://dpaste.org/Zqura

Hey @ColtonYYZ - sorry to hear about the challenges youโ€™ve been facing :man_facepalming: Let me at least try to fix your issues with Chime TTS and Alexa :+1:

I want to clarify with you exactly when the issue occurs and when it does not. I have understood the follow, please correct me if iโ€™m wrong:

# Cache Value New File Generated? Playback Result
1 false Yes :x: Simon Says error
2 true Yes (on first run) :white_check_mark: Successful playback
3 true No (on subsequent runs) :white_check_mark: Successful playback

Assuming this is correct: I donโ€™t understand why the cached version of the MP3 plays correctly the second time, but newly generated MP3s do not. It would make sense that thereโ€™s a difference between the two.

Can you please try the following?

  1. Run chime_tts.say to create a new MP3 with cache set to true (i.e: scenario #2 in the above table), and then try to play it via notify.alexa_media?
  2. Repeat the same call to chime_tts.say and then try to play it via notify.alexa_media (scenario #3)?

It might also be useful if you could please save the file each time, so I can compare the two.

Hey @Nimrod_Dolev!

I ran the tests you mentioned. They both worked fine. BUT, as soon as I was finished running the last test, I decided to go uncheck the cache and make no other changes, and run the test again, and I received the Simon Says error. So it works fine when cache is set to true but fails when itโ€™s set to false.

Here are the logs:

https://dpaste.org/YKqK4

C

Hi Nim.

So, I deleted the integration, completely rebooted my HA box, and reinstalled it from HACS. (I used SSH to delete all the old chime_tts files from HA and reloaded it anew from HACS and reconfigured.)

Sonos now working again, but absolutely nothing out of the HomePod. (I had to change TTS platform from Nabu Casa โ†’ Microsoft, to make even the Sonos work.)

My (re)configuration is:

I still have the changes we made to configuration.yaml.

Screenshot 2024-10-31 at 1.39.24 PM

Any clue?

โ€“ Darrell

Debug logs for HomePod below:

2024-10-31 15:44:53.729 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-10-31 15:44:53.729 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say Called. Version v1.1.5 โ•‘
2024-10-31 15:44:53.729 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-10-31 15:44:53.729 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-10-31 15:44:53.731 INFO (MainThread) [custom_components.chime_tts.helpers.media_player] Turning on "media_player.darrells_office_homepod"...
2024-10-31 15:44:53.733 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-31 15:44:53.733 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-10-31 15:44:53.733 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-31 15:44:53.733 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = ['media_player.darrells_office_homepod']
2024-10-31 15:44:53.733 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = /config/www/sounds/chime.mp3
2024-10-31 15:44:53.733 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = True
2024-10-31 15:44:53.733 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-10-31 15:44:53.736 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-10-31 15:44:53.737 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = Test of TTS
2024-10-31 15:44:53.737 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = microsoft
2024-10-31 15:44:53.737 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-10-31 15:44:53.737 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-10-31 15:44:53.737 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = True
2024-10-31 15:44:53.737 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * fade_audio = False
2024-10-31 15:44:53.737 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-10-31 15:44:53.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-10-31 15:44:53.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-10-31 15:44:53.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * media_players_array:
2024-10-31 15:44:53.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] - 0: entity_id: media_player.darrells_office_homepod
2024-10-31 15:44:53.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] platform: apple_tv
2024-10-31 15:44:53.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] initial volume: -1.0
2024-10-31 15:44:53.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] target volume: -1.0
2024-10-31 15:44:53.738 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] now playing: False
2024-10-31 15:44:53.739 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] join supported: False
2024-10-31 15:44:53.739 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] announce supported: False
2024-10-31 15:44:53.739 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-31 15:44:53.739 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-10-31 15:44:53.739 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-31 15:44:53.739 DEBUG (MainThread) [custom_components.chime_tts] *** Checking Chime TTS audio cache ***
2024-10-31 15:44:53.744 DEBUG (MainThread) [custom_components.chime_tts] Cached audio found:
2024-10-31 15:44:53.745 DEBUG (MainThread) [custom_components.chime_tts] - local_path = "/media/sounds/temp/chime_tts/sfz803o1.mp3"
2024-10-31 15:44:53.745 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 3.931
2024-10-31 15:44:53.745 DEBUG (MainThread) [custom_components.chime_tts] - public_path = None
2024-10-31 15:44:53.745 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = "media-source://media_source/local/sounds/temp/chime_tts/sfz803o1.mp3"
2024-10-31 15:44:53.745 DEBUG (MainThread) [custom_components.chime_tts] ...cached audio found
2024-10-31 15:44:53.745 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-31 15:44:53.745 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Chime TTS playback โ”‚
2024-10-31 15:44:53.746 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-10-31 15:44:53.746 DEBUG (MainThread) [custom_components.chime_tts] 1 Regular media player detected:
2024-10-31 15:44:53.746 DEBUG (MainThread) [custom_components.chime_tts] - media_player.darrells_office_homepod
2024-10-31 15:44:53.746 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-10-31 15:44:53.746 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.darrells_office_homepod']
2024-10-31 15:44:53.747 DEBUG (MainThread) [custom_components.chime_tts] - announce: True
2024-10-31 15:44:53.747 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-10-31 15:44:53.747 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/sfz803o1.mp3
2024-10-31 15:44:53.748 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.931s for audio playback to complete...
2024-10-31 15:44:57.681 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] - Waiting until 1 media_player isn't playing...
2024-10-31 15:44:57.681 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player_helper] โœ” media_player.darrells_office_homepod
2024-10-31 15:44:57.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-10-31 15:44:57.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚โ”€โ”€โ”€โ”€ Chime TTS Say Completed in 3.95 s โ”€โ”€โ”€โ”€โ”‚
2024-10-31 15:44:57.682 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Datapoint. On a standard media player using my HomePod, I can browse to the folder where the cached files are (/media/sounds/temp/chime_tts) and play the file directly on the device.

So far this has been a great integration! Cant tell you how much Iโ€™ve messed around with things like dummy media players and what not to try get a URL for Sonos announce!
Thank you @Nimrod_Dolev :pray:t4:
Then I have a question:

I setup ChimeTTS to get a URL using Piper as below.

I get a URL and the file can be see and heard all as expected.

Then of course I want to complicate thingsโ€ฆ I came across Elevenlabs TTS to get more natural sounding voices and I was like โ€œperfect I can just swap this in for Piper and itโ€™s like Im living in the future!โ€ but I got stuck.

Elevenlabs TTS is setup, and works as expected (tested this through media sources - tts - send to brower). I have a preselected voice in the config for ElevenLabs etc and I hear what is expected.

When setting it up as a TTS provider in Chime TTS as below:

Then running the action, it only produces a URL with the chime, no TTS.
The logs look like the below (including the media file error too):

This error originated from a custom integration.

Logger: custom_components.chime_tts
Source: custom_components/chime_tts/__init__.py:1041
integration: Chime TTS (documentation, issues)
First occurred: 11:33:51 (1 occurrences)
Last logged: 11:33:51

Error generating TTS audio from messsage segment #1: {'type': 'tts', 'message': 'This is a chime tts test. If you are hearing this, then all systems are go!'}
This error originated from a custom integration.

Logger: custom_components.chime_tts
Source: custom_components/chime_tts/__init__.py:680
integration: Chime TTS (documentation, issues)
First occurred: 11:33:51 (1 occurrences)
Last logged: 11:33:51

The elevenlabs platform was not found. Please check that it has been configured correctly: https://www.home-assistant.io/integrations/#text-to-speech
This error originated from a custom integration.

Logger: custom_components.chime_tts.helpers.media_player_helper
Source: custom_components/chime_tts/helpers/media_player_helper.py:241
integration: Chime TTS (documentation, issues)
First occurred: 12:46:32 (1 occurrences)
Last logged: 12:46:32

Media file "%s" is not in a local media directory. See https://www.home-assistant.io/more-info/local-media/setup-media/

Any thoughts on this? Is this a known limitation? Am I missing something here?

Edit: Removed mention of the โ€œMedia file โ€œ%sโ€ is not in a local media directoryโ€ฆโ€ error. Seems like adding a folder location for custom chimes (only thing I changed since posting) removed this error.
Edit 2: Never mind, that โ€œMedia fileโ€ฆโ€ error is still in my logs when using Piper or Elevenlabs

Hi,

Iโ€™m having some troubles using this integration. I have 5 Sonos devices and I want to use them for the doorbell and to announce some information for the kids (dinner is ready). I want to join all the players for this and after the doorbell/announcement each Sonos device must continue playing the radio station or Spotify on the Sonos that was playing before.
Could I achieve this using only this integration, or do I need to snapshot / join / unjoin / restore option from the Sonos integration. I would be really grateful when someone could share his code for this. I tried several combinations but not with the expected result.
Please keep in mind that Iโ€™m using only Sonos devices (I have read several different things that is working on one brand and not on another)

Thanks a lot
Kris

Anyone noticing that volume_level is being ignored? Doesnโ€™t seem to be working when I send a TTS to my Sonos devices. Only seems to be an issue for Sonos devices though

2024-11-23 13:50:45.260 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
2024-11-23 13:50:45.261 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•‘ Chime TTS Say Called. Version v1.1.6-beta5 โ•‘
2024-11-23 13:50:45.261 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
2024-11-23 13:50:45.261 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-11-23 13:50:45.264 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-11-23 13:50:45.264 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ General Parameters โ”‚
2024-11-23 13:50:45.264 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-11-23 13:50:45.264 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * entity_ids = ['media_player.kitchen']
2024-11-23 13:50:45.264 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * chime_path = bells_2
2024-11-23 13:50:45.264 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * cache = False
2024-11-23 13:50:45.264 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * offset = 450.0
2024-11-23 13:50:45.264 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * final_delay = 0.0
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * message = test
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_platform = cloud
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_speed = 100.0
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_pitch = 0
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * announce = False
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * fade_audio = False
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * volume_level = 0.49
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * join_players = False
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * unjoin_players = False
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * media_players_array:
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]    - 0: entity_id: media_player.kitchen
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      platform: sonos
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      initial volume: 0.22
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      target volume: 0.49
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      now playing: False
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      join supported: True
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]      announce supported: True
2024-11-23 13:50:45.265 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
2024-11-23 13:50:45.266 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ”‚ Preparing Audio โ”‚
2024-11-23 13:50:45.266 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
2024-11-23 13:50:45.266 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] Local path to chime: /config/custom_components/chime_tts/mp3s/bells_2.mp3
2024-11-23 13:50:45.266 DEBUG (MainThread) [custom_components.chime_tts]  - Retrieving audio from path: "/config/custom_components/chime_tts/mp3s/bells_2.mp3"...
2024-11-23 13:50:45.389 DEBUG (MainThread) [custom_components.chime_tts]    ...audio retrieved. Duration: 1.279s
2024-11-23 13:50:45.390 DEBUG (MainThread) [custom_components.chime_tts]  - Generating new TTS audio with parameters:
2024-11-23 13:50:45.390 DEBUG (MainThread) [custom_components.chime_tts]     * tts_platform = 'cloud'
2024-11-23 13:50:45.391 DEBUG (MainThread) [custom_components.chime_tts]     * message = 'test'
2024-11-23 13:50:45.391 DEBUG (MainThread) [custom_components.chime_tts]     * cache = False
2024-11-23 13:50:45.391 DEBUG (MainThread) [custom_components.chime_tts]     * language = None
2024-11-23 13:50:45.391 DEBUG (MainThread) [custom_components.chime_tts]     * options = {}
2024-11-23 13:50:45.689 DEBUG (MainThread) [custom_components.chime_tts]    ...TTS audio generated in 300.0ms
2024-11-23 13:50:45.695 DEBUG (MainThread) [custom_components.chime_tts]  - Saving mp3 file to local folder: /media/sounds/temp/chime_tts/...
2024-11-23 13:50:45.807 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] File saved to path: /media/sounds/temp/chime_tts/a_vctyn_.mp3
2024-11-23 13:50:45.923 DEBUG (MainThread) [custom_components.chime_tts]  - Chime TTS audio generated:
2024-11-23 13:50:45.923 DEBUG (MainThread) [custom_components.chime_tts]    * audio_duration = 3.241
2024-11-23 13:50:45.923 DEBUG (MainThread) [custom_components.chime_tts]    * local_path = "/media/sounds/temp/chime_tts/a_vctyn_.mp3"
2024-11-23 13:50:45.923 DEBUG (MainThread) [custom_components.chime_tts]    * public_path = None