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

Sorry to bring this up again, but I’d love to be able to get access to the MP3 file. Any ideas anyone?

You’re able to get that by using the say_url function - it’l return the full url of the mp3 but you can parse it to find the location. Also look in the folder “/homeassistant/www/chime_tts”

sadly not!

I created an open issue in the github page for Chime_TTS a month ago, no response.

Also a request, add Elevenlabs_TTS to the available choices of platforms

Does your Chime_TTS look like this?

It looks like this, so the same apart from the chime TTS mp3s URL option.
I tried to amend it to include the “/config/”, but when I save, it switches it back!

Chime SAY works but Chime Say URL does not. But the logs are misleading because they say things are being saved which are not.

Working:

2024-03-25 15:44:08.690 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v0.13.1-beta13 -----
2024-03-25 15:44:08.691 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-03-25 15:44:08.691 DEBUG (MainThread) [custom_components.chime_tts.helpers] ``` is_say_url = False
2024-03-25 15:44:08.693 DEBUG (MainThread) [custom_components.chime_tts.helpers] ----- General Parameters -----
2024-03-25 15:44:08.693 DEBUG (MainThread) [custom_components.chime_tts.helpers] * entity_ids = ['media_player.vlc_telnet']
2024-03-25 15:44:08.693 DEBUG (MainThread) [custom_components.chime_tts.helpers] * cache = False
2024-03-25 15:44:08.694 DEBUG (MainThread) [custom_components.chime_tts.helpers] * offset = 450.0
2024-03-25 15:44:08.694 DEBUG (MainThread) [custom_components.chime_tts.helpers] * final_delay = 0.0
2024-03-25 15:44:08.694 DEBUG (MainThread) [custom_components.chime_tts.helpers] * message = Shamone!
2024-03-25 15:44:08.694 DEBUG (MainThread) [custom_components.chime_tts.helpers] * tts_platform = google_translate
2024-03-25 15:44:08.694 DEBUG (MainThread) [custom_components.chime_tts.helpers] * tts_playback_speed = 100.0
2024-03-25 15:44:08.695 DEBUG (MainThread) [custom_components.chime_tts.helpers] * announce = False
2024-03-25 15:44:08.695 DEBUG (MainThread) [custom_components.chime_tts.helpers] * volume_level = -1.0
2024-03-25 15:44:08.695 DEBUG (MainThread) [custom_components.chime_tts.helpers] * join_players = False
2024-03-25 15:44:08.695 DEBUG (MainThread) [custom_components.chime_tts.helpers] * unjoin_players = False
2024-03-25 15:44:08.698 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-03-25 15:44:08.698 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'google_translate'
2024-03-25 15:44:08.698 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Shamone!'
2024-03-25 15:44:08.699 DEBUG (MainThread) [custom_components.chime_tts] * tts_playback_speed = 100.0
2024-03-25 15:44:08.699 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-03-25 15:44:08.699 DEBUG (MainThread) [custom_components.chime_tts] * language = 'None'
2024-03-25 15:44:08.699 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-03-25 15:44:09.367 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio completed in 668.8570000000001 ms
2024-03-25 15:44:09.367 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to folder: /media/sounds/temp/chime_tts/...
2024-03-25 15:44:09.555 DEBUG (MainThread) [custom_components.chime_tts.helpers] - File saved to path: /media/sounds/temp/chime_tts/_jvu5x_c.mp3
2024-03-25 15:44:09.555 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated: {'audio_duration': 1.152, 'local_path': '/media/sounds/temp/chime_tts/_jvu5x_c.mp3', 'public_path': None}
2024-03-25 15:44:09.556 DEBUG (MainThread) [custom_components.chime_tts] - 1 Standard media player detected. Calling `media_player.play_media` service
2024-03-25 15:44:09.556 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media with data:
2024-03-25 15:44:09.556 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-03-25 15:44:09.556 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/_jvu5x_c.mp3
2024-03-25 15:44:09.556 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.vlc_telnet']
2024-03-25 15:44:09.557 DEBUG (MainThread) [custom_components.chime_tts] Waiting 1.152s for audio playback to complete...
2024-03-25 15:44:10.719 DEBUG (MainThread) [custom_components.chime_tts.helpers] - Waiting until media_player.vlc_telnet is no longer = playing...
2024-03-25 15:44:14.948 DEBUG (MainThread) [custom_components.chime_tts.helpers] ...media_player.vlc_telnet is now idle
2024-03-25 15:44:14.949 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 6257.627 ms -----

Not working:-

2024-03-25 15:47:08.912 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say URL Called. Version v0.13.1-beta13 -----
2024-03-25 15:47:08.913 DEBUG (MainThread) [custom_components.chime_tts.queue_manager] Adding service call to queue
2024-03-25 15:47:08.913 DEBUG (MainThread) [custom_components.chime_tts.helpers] ``` is_say_url = True
2024-03-25 15:47:08.914 DEBUG (MainThread) [custom_components.chime_tts.helpers] ----- General Parameters -----
2024-03-25 15:47:08.914 DEBUG (MainThread) [custom_components.chime_tts.helpers] * entity_ids = []
2024-03-25 15:47:08.914 DEBUG (MainThread) [custom_components.chime_tts.helpers] * cache = False
2024-03-25 15:47:08.914 DEBUG (MainThread) [custom_components.chime_tts.helpers] * offset = 450.0
2024-03-25 15:47:08.915 DEBUG (MainThread) [custom_components.chime_tts.helpers] * final_delay = 0.0
2024-03-25 15:47:08.915 DEBUG (MainThread) [custom_components.chime_tts.helpers] * message = Awooga!
2024-03-25 15:47:08.915 DEBUG (MainThread) [custom_components.chime_tts.helpers] * tts_platform = google_translate
2024-03-25 15:47:08.915 DEBUG (MainThread) [custom_components.chime_tts.helpers] * tts_playback_speed = 100.0
2024-03-25 15:47:08.915 DEBUG (MainThread) [custom_components.chime_tts.helpers] * announce = False
2024-03-25 15:47:08.915 DEBUG (MainThread) [custom_components.chime_tts.helpers] * volume_level = -1.0
2024-03-25 15:47:08.915 DEBUG (MainThread) [custom_components.chime_tts.helpers] * join_players = False
2024-03-25 15:47:08.916 DEBUG (MainThread) [custom_components.chime_tts.helpers] * unjoin_players = False
2024-03-25 15:47:08.916 DEBUG (MainThread) [custom_components.chime_tts] - Generating new TTS audio with parameters:
2024-03-25 15:47:08.916 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = 'google_translate'
2024-03-25 15:47:08.916 DEBUG (MainThread) [custom_components.chime_tts] * message = 'Awooga!'
2024-03-25 15:47:08.917 DEBUG (MainThread) [custom_components.chime_tts] * tts_playback_speed = 100.0
2024-03-25 15:47:08.917 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2024-03-25 15:47:08.917 DEBUG (MainThread) [custom_components.chime_tts] * language = 'None'
2024-03-25 15:47:08.917 DEBUG (MainThread) [custom_components.chime_tts] * options = {}
2024-03-25 15:47:09.606 DEBUG (MainThread) [custom_components.chime_tts] ...TTS audio completed in 689.3399999999999 ms
2024-03-25 15:47:09.606 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file to folder: /www/chime_tts/...
2024-03-25 15:47:09.793 DEBUG (MainThread) [custom_components.chime_tts.helpers] - File saved to path: /www/chime_tts/z5p0l_ze.mp3
2024-03-25 15:47:09.800 DEBUG (MainThread) [custom_components.chime_tts] - Saving data to chime_tts storage:
2024-03-25 15:47:09.801 DEBUG (MainThread) [custom_components.chime_tts] - key: "fd67b1d08f43e83b402a01f18b05c91da8f3ba0043e238cdd4e04665a39fd950"
2024-03-25 15:47:09.801 DEBUG (MainThread) [custom_components.chime_tts] - value: "{'public_path': '/www/chime_tts/z5p0l_ze.mp3', 'audio_duration': 1.008}"
2024-03-25 15:47:09.873 DEBUG (MainThread) [custom_components.chime_tts] - Chime TTS audio generated: {'audio_duration': 1.008, 'local_path': None, 'public_path': '/www/chime_tts/z5p0l_ze.mp3'}
2024-03-25 15:47:09.874 DEBUG (MainThread) [custom_components.chime_tts] Final URL = /www/chime_tts/z5p0l_ze.mp3
2024-03-25 15:47:09.874 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say URL Completed in 960.592 ms -----

The editor in HASS is wierd - try prepending the /www/chime_tts parameter with /config THEN press TAB. should take you to the next line without clearing your entry.
Then you should be able to save it.

also I’m puzzled by the line from your log output that says:

media_content_id: media-source://media_source/local/sounds/temp/chime_tts/_jvu5x_c.mp3

the media_content_id: should be a ip address or FQN do you have any network connection to your hass server from outside your network? Is media_source a network name?

this is what I get from mine:

https://xxxxxhome.duckdns.org:443/local/chime_tts/_75web41.mp3

not sure, might be because I’m using the VLC Media Player Telnet application as a target just to get it to generate the TTS MP3?

Sadly not. Might have to do this? chime_tts.say_url default save folder doesn't seem to exist, but works with modifications · Issue #86 · nimroddolev/chime_tts · GitHub Seems strange that only some of us have this issue.

But also the folder paths aren’t consistent - the /media/ one really is ‘above’ the ‘config’ directory but the ‘www’ one is beneath it.

I know that when I starting using this package, I had some false starts. I’ve completely deleted the whole thing including going to the /custom_components folder an making sure that there weren’t any residual pieces laying about. Then reinstalling from HACS and entering the values in the configuration as they are now.

Might be something to try.

I’ve been working on a substantial release which includes quite a few new features and bugfixes which include issues with the default folder paths for both chime_tts.say and chime_tts.say_url.

It’s not quite ready, and the documentation isn’t complete yet, but I would be grateful for feedback whether these issues persist for you in the new version or have been addressed so I have released a beta (v0.14.0-beta1).

To install the 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 v0.14.0-beta1 from the updated version drop-down list

  6. Restart Home Assistant

1 Like

So far…
When trying to change the default TTS service the config doesn’t seem to take anything and throws an error. I’ve tried Piper, tts.piper tts.elevenlabs_tts, All with the same results.

When trying to create a new message using chime_tts:say no pull-down selection for tts.elevenlabs_tts. But just adding it by typing it in does work.

Thank you! This fixed the issue for me!

1 Like

Thank you @dbullendsl for the feedback.

I resolved both issues in a new beta release: v0.14.0-beta2.

I’ve updated to latest beta and the config panel does accept a default tts platform. Although even tho it’s configured when I try to create a call to ctts:say the platform still requires a value to be input for the platform - shouldn’t it be pre-filled for the default value?

Also, the issue I raised earlier about the volume not reverting to previous now seems resolved.

Haven’t discovered anything else.

I’m glad to hear those issues seem to be resolved.

Unfortunately Home Assistant doesn’t allow for editing service UI elements, so I have no way of changing the TTS Platform dropdown options list.

so then, why bother having a default ?

It is used when tts_platform is null

hi,
does the goole cast devices like nest hub 2 and and the nest mini 2 support the ‘annouce’.
thank you in advance

Hi @BENZAKOUR86. I don’t own either of those devices so unfortunately I can’t confirm. When enabling the announce parameter in the latest version, chime_tts.say checks whether the feature is supported by the media_player platform, and if not, it fades out & pauses any currently playing music and then after the announcement is completed it resumes the music and fades it back in.

If the feature doesn’t work as expected I would be happy to troubleshoot with you and see if there’s a way I can add support for these platforms.