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

hi @Nimrod_Dolev,
Thank you for your response. I can confirm that I’ve tested the announce feature on both Google Nest Hub 2 and Nest Mini 2, and unfortunately, it does not work as expected on these devices. Despite enabling the announce parameter in the latest version, the feature does not function properly.

I appreciate your willingness to troubleshoot and potentially add support for these platforms. If there’s any further information I can provide or if you need assistance with testing, please let me know.

Problem w Alexa in v1.0.0 ? --I installed v1.0.0 yesterday, and ever since my Chime TTS announcements have not been working over Alexa – they play the starting chime OK, then announce that they’re having difficulty with the Simon Says skill --which I do not think I’ve ever enabled in my Alexa account

My automations send message to a persistent notif. in HA, then a notif. to my iPhone, then Chime TTS targeting 3 Amazon Echo units w most options not selected --just chime path, volume level, join players & unjoin players, cache, announce, & gender= female. Using Nabu Casa Cloud for TTS option.

Has been working REALLY well (v0.13.0), with only minor occasional hiccups (maybe timing glitches, maybe with cloud services). But after v1.0.0, I don’t think it has played properly even once. (Can’t test right now, due to sleeping folks in house.)

Hi @tim.plas, I’m sorry to hear you’ve been having issues with the new version.

In your comment you mentioned using using the gender parameter, which has been deprecated. There is a new beta version of Chime TTS which replaced gender with voice. Could you please upgrade to the beta and let me know if it fixes your issues?

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.0.1-beta2 from the updated version drop-down list
  6. Restart Home Assistant

Another possible cause might be that you don’t have an external URL configured in your configuration.yaml file. Can you please add the following YAML to configuration.yaml ?

homeassistant:
  external_url: "https://YOUR_UNIQUE_ADDRESS.ui.nabu.casa/"
  internal_url: "http://192.168.X.X:8123/"

If you’re still having issues, can you please share your debug logs so that I might get a better idea of what else might be causing the problem?

To enable debug logging:

  1. Turn on debug logging:

    service: logger.set_level
    data:
      custom_components.chime_tts: debug
    
  2. Call the service chime_tts.say again.

  3. Check your log messages in Home Assistant:

    https://{YOUR_HOME_ASSISTANT_ADDRESS}:8123/config/logs?filter=chime_tts
    

    and click LOAD FULL LOGS

Thanks so much for the swift and informative reply! I will check those things in the AM. Will let you know then. Thanks much!

Hello Nim. Thanks for the suggestions.

I upgraded to v1.0.1-beta2 then built & ran a quick new automation for testing.
Unfortunately the issue was still present after the upgrade.
I did not know what to put into the “voice” parameter, so didn’t use that at all.

I then updated configuration.yaml as you suggested to include internal & external URLs.
Unfortunately still had the same difficulty.

The exact voice message I’m getting from Alexa Echo is “Sorry I’m having trouble accessing your Simon Says xxxx skill right now.” --I can’t quite catch the word right after Simon Says; it sounds something like “Simon Says noss skill”.

I tried to enable debug logging, but am unsure where to put the YAML lines you suggested? When I tried putting that into configuration.yaml it failed the “Check Configuration” in Developer Tools.

I can certainly try again for debugging info, if I find out what I’m missing about setting up debug log.

Thanks.

Hi Tim.

Since v1.0.0, Chime TTS uses the notify.alexa_media service to play audio on Alexa media_players (I was under the false impression that it wasn’t possible to use the media_player.play_media service - as I wrote in my previous post).
Now that I understand that some Alexa media players can play media via media_player.play_media and others require the notify.alexa_media service, it would be great to be able to distinguish between the two so that I can direct Chime TTS to the right service. This is where I’m hoping your debug logs can be useful.
Ultimately if there isn’t a way to differentiate between these two classes, I can implement a toggle in the configuration to force the use of one service or the other, but it’s more clunky.


Debugging

To enable debugging you can call the logger.set_level service from the Services tab in the Developer Tools page

service: logger.set_level
data:
  custom_components.chime_tts: debug


Simon Says Error

I don’t have an Echo speaker so I am not familiar with the ecosystem, and without the debug logs it’s difficult to pinpoint the issue - but you should check if you can access the URLs generated by the chime_tts.say_url service:

  1. Run chime_tts.say_url and open the URL returned by the service call in a browser. If it is not accessible, you likely have either:
    a. An issue with your remote access to your Home Assistance instance
    b. An incorrect folder path for chime_tts.say_url to store MP3s

  2. Assuming the URL is accessible, please try using it to call notify.alexa_media:

    service: notify.alexa_media
    data:
      message: <audio src= "https://THE-GENERATED-MP3-URL"/>
      target: "media_player.echo_speaker"
      data:
        type: tts
    

    If it is still not working, perhaps you have an issue with your Alexa integration. I believe there is a setting in the Alexa Media Player’s configuration to define your remote URL:
    Public URL to access Home Assistant (including trailing '/')).

If you’re still stuck, then hopefully the debug logs will be useful. Otherwise you can search this forum/Google to find out what other users have done to fix the issue.


Voice

As I understand, the voice parameter replaces the gender parameter which has now been deprecated by Nabu Casa. You can find a better explanation of using different voices in this post.


Nim- Thanks very much, again.

Re need to use notify.alexa vs media_player.play: Ooh, that’s ugly, if they have different requirements for different Alexa media players. I am using the standard HACS Alexa Media Player integration. But I’ve got all of the Alexa Echo generations: an Echo-1, and Echo Dot from gen 2 thru 5. I don’t honestly care if gen-1 and gen-2 devices work for notifications.

Re debugging log setup: Thanks for detailed info to do that. As I tell people, I haven’t been a developer since the last century. :slight_smile: I will try that, and report back the log results.

Re Simon Says error: I will perform the tests you requested, and report the results.

Re Alexa integration: A config issue with mine is certainly possible. I do have the “Public URL to access HA” set properly in the Alexa integration. But my instance does act differently than some peoples’ --Amazon Echo sensors (like temperature) are supposed to show up in HA automatically, but mine never have.

Re Voice: Wow, that’s cool. Thanks for link.

I’ll be posting my test / logging results yet today. Thanks again.

Here are the debug logging results that I just ran. The call was stripped down to absolute basics: a single Alexa Echo Dot target device, a chime path, and a text message. I ran it twice, on 2 different devices: a Gen-3 Echo Dot, and a Gen-5 Echo Dot. Both acted the same (speaking the same error message re Simon Says).

2024-04-09 13:11:52.652 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.0.1-beta2 -----
2024-04-09 13:11:52.652 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = ['media_player.office_echo']
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = bells
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = This is a test message.
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = cloud
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-04-09 13:11:52.659 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-04-09 13:11:52.660 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-04-09 13:11:52.660 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-04-09 13:11:52.660 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-04-09 13:11:52.660 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * audio_conversion = -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0
2024-04-09 13:11:52.660 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-04-09 13:11:52.661 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "custom_components/chime_tts/mp3s/bells.mp3"...
2024-04-09 13:11:52.862 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 0.944s
2024-04-09 13:11:52.863 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-04-09 13:11:52.863 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'cloud'
2024-04-09 13:11:52.863 DEBUG (MainThread) [custom_components.chime_tts] * message = 'This is a test message.'
2024-04-09 13:11:52.863 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-04-09 13:11:52.863 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-04-09 13:11:52.863 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-04-09 13:11:53.813 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 950.0ms
2024-04-09 13:11:53.817 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to folder: /config/www/chime_tts/...
2024-04-09 13:11:54.005 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] - File saved to path: /config/www/chime_tts/34gdv_1d.mp3
2024-04-09 13:11:54.005 DEBUG (MainThread) [custom_components.chime_tts] - Performing FFmpeg audio conversion...
2024-04-09 13:11:54.005 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Converting audio: "ffmpeg -i /config/www/chime_tts/34gdv_1d.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /config/www/chime_tts/34gdv_1d_converted.mp3"
2024-04-09 13:11:54.188 DEBUG (MainThread) [custom_components.chime_tts] ...FFmpeg audio conversion completed.
2024-04-09 13:11:54.439 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage:
2024-04-09 13:11:54.440 DEBUG (MainThread) [custom_components.chime_tts] - key: "693d1cd914452256479aade5be8bca8750f2fc9b3e4a0c5a89898b40afa8aa00"
2024-04-09 13:11:54.440 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'public_path': '/config/www/chime_tts/34gdv_1d.mp3', 'audio_duration': 3.888, 'local_path': None}"
2024-04-09 13:11:54.447 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-04-09 13:11:54.447 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 3.888
2024-04-09 13:11:54.448 DEBUG (MainThread) [custom_components.chime_tts] - local_path = None
2024-04-09 13:11:54.448 DEBUG (MainThread) [custom_components.chime_tts] - public_path = "https://<redacted>.ui.nabu.casa:8123//local/chime_tts/34gdv_1d.mp3"
2024-04-09 13:11:54.448 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = None
2024-04-09 13:11:54.448 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-04-09 13:11:54.448 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-04-09 13:11:54.451 DEBUG (MainThread) [custom_components.chime_tts] 1 Alexa media player detected:
2024-04-09 13:11:54.451 DEBUG (MainThread) [custom_components.chime_tts] - media_player.office_echo
2024-04-09 13:11:54.451 DEBUG (MainThread) [custom_components.chime_tts] Calling notify.alexa_media with data:
2024-04-09 13:11:54.452 DEBUG (MainThread) [custom_components.chime_tts] - message: <audio src="https://<redacted>.ui.nabu.casa:8123//local/chime_tts/34gdv_1d.mp3"/>
2024-04-09 13:11:54.452 DEBUG (MainThread) [custom_components.chime_tts] - data: {'type': 'tts'}
2024-04-09 13:11:54.452 DEBUG (MainThread) [custom_components.chime_tts] - target: ['media_player.office_echo']
2024-04-09 13:11:54.454 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.888s for audio playback to complete...
2024-04-09 13:11:58.346 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player] - Waiting until 1 media_player isn't playing...
2024-04-09 13:11:58.346 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player] ✔ media_player.office_echo


2024-04-09 13:18:23.285 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.0.1-beta2 -----
2024-04-09 13:18:23.285 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-04-09 13:18:23.294 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * entity_ids = ['media_player.kitchen_echo']
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * chime_path = bells
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * cache = False
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * offset = 450.0
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * final_delay = 0.0
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * message = This is a test message.
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_platform = cloud
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_speed = 100.0
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * tts_pitch = 0
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * announce = False
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * volume_level = -1
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * join_players = False
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * unjoin_players = False
2024-04-09 13:18:23.295 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] * audio_conversion = -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0
2024-04-09 13:18:23.296 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-04-09 13:18:23.296 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "custom_components/chime_tts/mp3s/bells.mp3"...
2024-04-09 13:18:23.504 DEBUG (MainThread) [custom_components.chime_tts] ...audio retrieved. Duration: 0.944s
2024-04-09 13:18:23.504 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-04-09 13:18:23.504 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'cloud'
2024-04-09 13:18:23.505 DEBUG (MainThread) [custom_components.chime_tts] * message = 'This is a test message.'
2024-04-09 13:18:23.505 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-04-09 13:18:23.505 DEBUG (MainThread) [custom_components.chime_tts] * language = None
2024-04-09 13:18:23.505 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-04-09 13:18:24.679 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio generated in 1.17s
2024-04-09 13:18:24.683 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to folder: /config/www/chime_tts/...
2024-04-09 13:18:24.858 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem] - File saved to path: /config/www/chime_tts/t6928wqh.mp3
2024-04-09 13:18:24.859 DEBUG (MainThread) [custom_components.chime_tts] - Performing FFmpeg audio conversion...
2024-04-09 13:18:24.859 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Converting audio: "ffmpeg -i /config/www/chime_tts/t6928wqh.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /config/www/chime_tts/t6928wqh_converted.mp3"
2024-04-09 13:18:25.044 DEBUG (MainThread) [custom_components.chime_tts] ...FFmpeg audio conversion completed.
2024-04-09 13:18:25.270 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage:
2024-04-09 13:18:25.270 DEBUG (MainThread) [custom_components.chime_tts] - key: "693d1cd914452256479aade5be8bca8750f2fc9b3e4a0c5a89898b40afa8aa00"
2024-04-09 13:18:25.270 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'public_path': '/config/www/chime_tts/t6928wqh.mp3', 'audio_duration': 3.888, 'local_path': None}"
2024-04-09 13:18:25.276 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated:
2024-04-09 13:18:25.276 DEBUG (MainThread) [custom_components.chime_tts] - audio_duration = 3.888
2024-04-09 13:18:25.276 DEBUG (MainThread) [custom_components.chime_tts] - local_path = None
2024-04-09 13:18:25.276 DEBUG (MainThread) [custom_components.chime_tts] - public_path = "https://<redacted>.ui.nabu.casa:8123//local/chime_tts/t6928wqh.mp3"
2024-04-09 13:18:25.276 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id = None
2024-04-09 13:18:25.276 DEBUG (MainThread) [custom_components.chime_tts] *** Pre-Playback Actions ***
2024-04-09 13:18:25.276 DEBUG (MainThread) [custom_components.chime_tts] *** Chime TTS playback ***
2024-04-09 13:18:25.278 DEBUG (MainThread) [custom_components.chime_tts] 1 Alexa media player detected:
2024-04-09 13:18:25.278 DEBUG (MainThread) [custom_components.chime_tts] - media_player.kitchen_echo
2024-04-09 13:18:25.278 DEBUG (MainThread) [custom_components.chime_tts] Calling notify.alexa_media with data:
2024-04-09 13:18:25.278 DEBUG (MainThread) [custom_components.chime_tts] - message: <audio src="https://<redacted>.ui.nabu.casa:8123//local/chime_tts/t6928wqh.mp3"/>
2024-04-09 13:18:25.278 DEBUG (MainThread) [custom_components.chime_tts] - data: {'type': 'tts'}
2024-04-09 13:18:25.278 DEBUG (MainThread) [custom_components.chime_tts] - target: ['media_player.kitchen_echo']
2024-04-09 13:18:25.279 DEBUG (MainThread) [custom_components.chime_tts] - Waiting 3.888s for audio playback to complete...
2024-04-09 13:18:29.169 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player] - Waiting until 1 media_player isn't playing...
2024-04-09 13:18:29.170 DEBUG (MainThread) [custom_components.chime_tts.helpers.media_player] ✔ media_player.kitchen_echo
2024-04-09 13:18:29.170 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 5.88 s -----

Thanks for the logs Tim. Everything looks valid and there’s no leads for the time being.

When viewing the logs page in Home Assistant, can you please try removing any search filters so that you see all log messages from all components? I’m hoping to see log messages from the Alexa Media Player when trying to play on the Echos which might be useful.

TO enable log messages for the Alexa integration, please run the following in the Services tab of the Developer tools page:

service: logger.set_level
data:
  custom_components.alexa_media: debug

Nim- Here’s what I’ve tried just now, starting from one of your earlier items of advice.

I ran a chime_tts.say_url --which generated an MP3 as expected, into the /config/www/chime_tts/ folder.

I can play that MP3 just fine in Windows, via Samba share into HA.

But when I try browser to access:
https://REDACTED.ui.nabu.casa:8123/local/chime_tts/FILENAME.mp3
I get an “ERR_CONNECTION_TIMED_OUT” browser page.

I then tried just pointing browser at:
https://REDACTED.ui.nabu.casa:8123/
expecting my main HA dashboard, but that also errors out.

Then I brought up my normal Nabu Casa link, which does NOT have the 8123 port:
https://REDACTED.ui.nabu.casa/
and that DOES work to get to my dashboard.

I then noticed that Alexa Media Player integration in HA has the configuration item that says "Public URL to access HA (including trailing ‘/’) does NOT include the 8123 port. (I had copied the URL from HA “Cloud” settings page (where no port # is shown), & had just added the ‘/’ as directed.) I added the port # to the Alexa Media Player integration config. And restarted HA, since I had changed something on a HACS component.

But alas, still no joy.

Next I tried pointing browser to:
https://REDACTED.ui.nabu.casa/local/chime_tts/FILENAME.mp3 <–with NO port number.

and that works !!! (It plays the message from the URL on the PC.)

I have reverted the “Public URL to access HA” setting in AMP (Alexa Media Player) integration back to just the URL without port #. And restarted HA again.

It feels to me that the Chime_TTS.Say_URL should NOT include the 8123 port # in the generated URL. Does that make sense? (At least for Alexa usage?)

Hey Tim. We’re making progress!

Thanks for the feedback. I’ll look into how & when to include the port number. I probably won’t get to it today but hopefully tomorrow I’ll have an update. :+1:

I can confirm that there is no reference to the 8123 port number in Chime TTS at all.

Perhaps you have the port number included in the external_url in your configuration.yaml file? Eg:

homeassistant:
  external_url: "https://REDACTED.ui.nabu.casa:8123"

Nim-

BINGO! That was it. It works now.

I’m so sorry to have wasted your time helping me chase this down. This was the first time that I’ve had to include config for External_URL, and I got it wrong. Bummer.

Thanks SO much for your assistance on this.

:partying_face: Excellent!
Glad to hear it was something simple!

New Feature: Chime TTS Notify

I just released a new beta version, v1.1.0-beta1 which introduces a Chime TTS notify platform, allowing you to setup notifications with Chime TTS.

Using notifications, you can make your own custom chime_tts.say calls with defined parameters, allowing you to more easily integrate Chime TTS into your scripts and automations.

I have outlined how to get started in the documentation, and I would appreciate it if you could please try it out and give any feedback you might have :+1:


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.0-beta1 from the updated version drop-down list
  6. Restart Home Assistant
1 Like

How can I remove this warning that was not there before version 1xx

This error comes from the integration itself.
Logger: custom_components.chime_tts
Source: custom_components/chime_tts/__init__.py:305
integration: Chime TTS (documentation, issues)
First occurrence: 18:00:20 (1 occurrences)
Last logged in: 18:00:20

Timed out waiting for playback to complete

I will take care of it in the next release

1 Like

Do you have a simple automation example I can use to test? Maybe I am having brain fog but I can’t figure out how to use this.

You can review the documentation page, and also examples of setting up notify entries and sending notifications.

Let me know if it is still unclear :+1:


EDIT: You can think of Chime TTS notifications as presets for chime_tts.say, allowing you to define any/all parameters for calls to chime_tts.say, besides the message parameter. This allows you to use (and reuse) any notify entry in your scripts/automations where you just need to provide the message parameter string (with the other parameters already configured).

Note that you can always override those values when using the noitfy.chime_tts service.

None of the chimes for Chime_TTS is working for me. I have the following YAML sample in an automation but nothing plays on the speakers:

service: chime_tts.say
target:
  device_id:
    - 7b6411bf17ee856f7ee2e0389f092dfa
    - af70e16c6931257151f80b6ce86d5153
data:
  chime_path: bright
  message: Testing 123
  tts_platform: google_cloud

When I use send a notification using Alexa Media, it works. Here’s the YAML I have that works:

service: notify.alexa_media
data:
  message: >-
    <audio
    src='https://REDACTED.ui.nabu.casa/local/mp3/Simple_UI_03_-_SFX__-_RMS_-_2496.mp3'/>
  target:
    - media_player.colton_s_echo_show
    - media_player.apartment_door_echo_amz
    - media_player.kitchen_echo_plus_amz
    - media_player.bathroom_echo_amz
    - media_player.couch_echo_left_amz
  data:
    type: tts
enabled: true

Not sure if this is helpful or not. Let me turn on debugging and then provide my logs to you…

EDIT: Here is my log:

2024-04-13 10:29:24.059 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v1.1.0-beta2 -----
2024-04-13 10:29:24.059 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-04-13 10:29:24.063 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] ----- General Parameters -----
2024-04-13 10:29:24.063 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * entity_ids = ['media_player.couch_echo_right_amz', 'media_player.bathroom_echo_amz']
2024-04-13 10:29:24.063 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * chime_path = bright
2024-04-13 10:29:24.063 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * cache = False
2024-04-13 10:29:24.063 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * offset = 450.0
2024-04-13 10:29:24.063 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * final_delay = 0.0
2024-04-13 10:29:24.063 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * message = Testing 123
2024-04-13 10:29:24.064 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_platform = amazon_polly
2024-04-13 10:29:24.064 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_speed = 100.0
2024-04-13 10:29:24.064 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * tts_pitch = 0
2024-04-13 10:29:24.064 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * announce = False
2024-04-13 10:29:24.064 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * volume_level = -1
2024-04-13 10:29:24.064 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * join_players = False
2024-04-13 10:29:24.064 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * unjoin_players = False
2024-04-13 10:29:24.064 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  * audio_conversion = -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0
2024-04-13 10:29:24.064 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers]  --- Audio will be converted to Alexa-friendly format as Alexa speaker/s detected ---
2024-04-13 10:29:24.065 DEBUG (MainThread) [custom_components.chime_tts]  - Retrieving audio from path: "custom_components/chime_tts/mp3s/bright.mp3"...
2024-04-13 10:29:24.171 DEBUG (MainThread) [custom_components.chime_tts]    ...audio retrieved. Duration: 0.637s
2024-04-13 10:29:24.171 DEBUG (MainThread) [custom_components.chime_tts]  - Generating new TTS audio with parameters:
2024-04-13 10:29:24.171 DEBUG (MainThread) [custom_components.chime_tts]     * tts_platform = 'amazon_polly'
2024-04-13 10:29:24.171 DEBUG (MainThread) [custom_components.chime_tts]     * message = 'Testing 123'
2024-04-13 10:29:24.171 DEBUG (MainThread) [custom_components.chime_tts]     * cache = False
2024-04-13 10:29:24.171 DEBUG (MainThread) [custom_components.chime_tts]     * language = None
2024-04-13 10:29:24.171 DEBUG (MainThread) [custom_components.chime_tts]     * options = {}
2024-04-13 10:29:24.338 DEBUG (MainThread) [custom_components.chime_tts]    ...TTS audio generated in 170.0ms
2024-04-13 10:29:24.342 DEBUG (MainThread) [custom_components.chime_tts]  - Saving mp3 file to folder: /www/chime_tts/...
2024-04-13 10:29:24.416 DEBUG (MainThread) [custom_components.chime_tts.helpers.filesystem]  - File saved to path: /www/chime_tts/0w246ltw.mp3
2024-04-13 10:29:24.416 DEBUG (MainThread) [custom_components.chime_tts]   - Performing FFmpeg audio conversion...
2024-04-13 10:29:24.417 DEBUG (MainThread) [custom_components.chime_tts.helpers.helpers] Converting audio: "ffmpeg -i /www/chime_tts/0w246ltw.mp3 -y -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 /www/chime_tts/0w246ltw_converted.mp3"
2024-04-13 10:29:24.487 DEBUG (MainThread) [custom_components.chime_tts]     ...FFmpeg audio conversion completed.
2024-04-13 10:29:24.578 DEBUG (MainThread) [custom_components.chime_tts]  - Saving data to chime_tts storage:
2024-04-13 10:29:24.578 DEBUG (MainThread) [custom_components.chime_tts]    - key:   "1fea49594873d4e79aa5f27fb2e83250f01292a45e780f533e9c0ec294e1ba63"
2024-04-13 10:29:24.578 DEBUG (MainThread) [custom_components.chime_tts]    - value: "{'public_path': '/www/chime_tts/0w246ltw.mp3', 'audio_duration': 2.904}"
2024-04-13 10:29:24.581 WARNING (MainThread) [custom_components.chime_tts.helpers.filesystem] Unable to create public URL - File: '/www/chime_tts/0w246ltw.mp3' is outside the public folder.
2024-04-13 10:29:24.582 ERROR (MainThread) [custom_components.chime_tts] async_get_playback_audio_path --> Unable to generate public audio file
2024-04-13 10:29:24.582 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 520.0 ms -----