Looks like this is where the problem resides. Where does that get set?
'audio_path'
Looks like this is where the problem resides. Where does that get set?
'audio_path'
I released a new beta with addition debug logs in the code which creates the local file paths. Could you please upgrade to v0.12.1-beta4 and send me the debug logs?
Looks like this is where the problem resides. Where does that get set?
'audio_path'
The code that sets audio_path
constructs the path by first obtaining the root folder. The preference is 1. Internal URL, 2. External URL and 3. using the hass
objectās config path function.
But I think we might have overlooked that when calling chime_tts.say
, the generated mp3 is played via a service call to media_player.play_media
using a media_content_id
- which does not contain the root address - local or remote, eg:
media-source://media_source/local/sounds/temp/chime_tts/tts/0asxzste.mp3
.
I know nothing about the Raspiaudo Muse Luxe, but could it be that it needs to be pointed at your local (your HAās IP) media source path?
Hopefully the new log messages will shed some light.
ok ā¦ testing b4
2024-01-22 17:24:48.865 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-01-22 17:25:23.893 INFO (MainThread) [custom_components.chime_tts] The Chime TTS integration is set up.
2024-01-22 17:25:24.145 DEBUG (MainThread) [custom_components.chime_tts] queue_timeout = 60
2024-01-22 17:25:24.145 DEBUG (MainThread) [custom_components.chime_tts] temp_chimes_path = /media/sounds/temp/chime_tts/chimes/
2024-01-22 17:25:24.145 DEBUG (MainThread) [custom_components.chime_tts] temp_path = /media/sounds/temp/chime_tts/
2024-01-22 17:25:24.145 DEBUG (MainThread) [custom_components.chime_tts] www_path = /www/chime_tts/
2024-01-22 17:25:24.146 DEBUG (MainThread) [custom_components.chime_tts] media_dir = local
2024-01-22 17:25:24.146 DEBUG (MainThread) [custom_components.chime_tts] custom_paths = {'custom_chime_path_1': '', 'custom_chime_path_2': '', 'custom_chime_path_3': '', 'custom_chime_path_4': '', 'custom_chime_path_5': ''}
2024-01-22 17:26:25.319 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v0.12.1-beta4 -----
2024-01-22 17:26:25.320 DEBUG (MainThread) [custom_components.chime_tts] Service call #0 was added to the queue.
2024-01-22 17:26:25.320 DEBUG (MainThread) [custom_components.chime_tts] Executing queued job #0
2024-01-22 17:26:25.330 DEBUG (MainThread) [custom_components.chime_tts.helpers] ----- General Parameters -----
2024-01-22 17:26:25.330 DEBUG (MainThread) [custom_components.chime_tts.helpers] * entity_ids = ['media_player.raspiaudio_muse_luxe_bbc618_raspiaudio_muse_luxe_bbc618']
2024-01-22 17:26:25.330 DEBUG (MainThread) [custom_components.chime_tts.helpers] * chime_path = bells
2024-01-22 17:26:25.330 DEBUG (MainThread) [custom_components.chime_tts.helpers] * end_chime_path =
2024-01-22 17:26:25.330 DEBUG (MainThread) [custom_components.chime_tts.helpers] * cache = False
2024-01-22 17:26:25.330 DEBUG (MainThread) [custom_components.chime_tts.helpers] * delay = 450.0
2024-01-22 17:26:25.330 DEBUG (MainThread) [custom_components.chime_tts.helpers] * final_delay = 0.0
2024-01-22 17:26:25.330 DEBUG (MainThread) [custom_components.chime_tts.helpers] * message = Test beta four
2024-01-22 17:26:25.331 DEBUG (MainThread) [custom_components.chime_tts.helpers] * tts_platform = tts.piper
2024-01-22 17:26:25.331 DEBUG (MainThread) [custom_components.chime_tts.helpers] * tts_playback_speed = 100.0
2024-01-22 17:26:25.331 DEBUG (MainThread) [custom_components.chime_tts.helpers] * announce = False
2024-01-22 17:26:25.331 DEBUG (MainThread) [custom_components.chime_tts.helpers] * volume_level = -1.0
2024-01-22 17:26:25.331 DEBUG (MainThread) [custom_components.chime_tts.helpers] * join_players = False
2024-01-22 17:26:25.331 DEBUG (MainThread) [custom_components.chime_tts.helpers] * unjoin_players = False
2024-01-22 17:26:25.331 DEBUG (MainThread) [custom_components.chime_tts] async_get_playback_audio_path
2024-01-22 17:26:25.332 DEBUG (MainThread) [custom_components.chime_tts] Retrieving audio from path: "custom_components/chime_tts/mp3s/bells.mp3"
2024-01-22 17:26:25.654 DEBUG (MainThread) [custom_components.chime_tts] - Audio retrieved. Duration: 0.944s
2024-01-22 17:26:25.655 DEBUG (MainThread) [custom_components.chime_tts] async_request_tts_audio(tts_platform='tts.piper', message='Test beta four', tts_playback_speed=100.0, cache=False, language=None, options={})
2024-01-22 17:26:25.655 DEBUG (MainThread) [custom_components.chime_tts] - Generating TTS audio...
2024-01-22 17:26:26.876 DEBUG (MainThread) [custom_components.chime_tts] - ...TTS audio completed in 1221.5240000000001 ms
2024-01-22 17:26:26.878 DEBUG (MainThread) [custom_components.chime_tts.helpers] Performing delay of 450.0ms
2024-01-22 17:26:26.882 DEBUG (MainThread) [custom_components.chime_tts] - Final audio created. Duration: 2.685s
2024-01-22 17:26:26.883 DEBUG (MainThread) [custom_components.chime_tts] - Saving mp3 file...
2024-01-22 17:26:27.127 DEBUG (MainThread) [custom_components.chime_tts.helpers] - File saved successfully
2024-01-22 17:26:27.127 DEBUG (MainThread) [custom_components.chime_tts.helpers] - File saved to path: /media/sounds/temp/chime_tts/w5t92smi.mp3
2024-01-22 17:26:27.127 DEBUG (MainThread) [custom_components.chime_tts] - Filepath = '/media/sounds/temp/chime_tts/w5t92smi.mp3'
2024-01-22 17:26:27.128 DEBUG (MainThread) [custom_components.chime_tts] - File saved successfully
2024-01-22 17:26:27.128 DEBUG (MainThread) [custom_components.chime_tts] - audio_dict = {'audio_path': '/media/sounds/temp/chime_tts/w5t92smi.mp3', 'audio_duration': 2.685}
2024-01-22 17:26:27.128 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media service with data:
2024-01-22 17:26:27.128 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-01-22 17:26:27.128 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/w5t92smi.mp3
2024-01-22 17:26:27.128 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.raspiaudio_muse_luxe_bbc618_raspiaudio_muse_luxe_bbc618']
2024-01-22 17:26:27.149 DEBUG (MainThread) [custom_components.chime_tts] ...media_player.play_media completed.
2024-01-22 17:26:27.149 DEBUG (MainThread) [custom_components.chime_tts] Waiting 2.685s for audio playback to complete...
2024-01-22 17:26:29.837 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 4509.626 ms -----
2024-01-22 17:26:29.840 DEBUG (MainThread) [custom_components.chime_tts] Removing current queued service call.
2024-01-22 17:26:29.840 DEBUG (MainThread) [custom_components.chime_tts] Queue emptied. Reinitializing values.
Still sending external address to Rapsi Muse
Unfortunately I donāt see the new log messages
I will continue fresh tomorrow, thanks for your patience.
OK ā¦Iāll continue to test for you ā¦ thanks
Can you please verify that you are able to use the media_player.play_media
service on the Raspi Muse with media from your media library?
Yes.The following works but still uses the external URL
service: media_player.play_media
target:
device_id:
- 5ee58c347fd86dda99e9d12179b1cd7e
data:
media_content_id: >-
media-source://media_source/local/smooth-ac-guitar-loop-93bpm-137706.mp3
media_content_type: music
This also works but uses the external URL
service: media_player.play_media
target:
device_id:
- 5ee58c347fd86dda99e9d12179b1cd7e
data:
media_content_id: >-
/media/local/smooth-ac-guitar-loop-93bpm-137706.mp3
media_content_type: music
Thank you. Given that the standard Home Assistant media_player.play_media
service calls produce the same issue I donāt think this is a Chime TTS issue.
I am afraid I donāt know what the issue is but I suspect it has to do with the Raspi Muse/ESP Home. Perhaps you could create a new post describing the external URL issue more generally, and not in relation to Chime TTS.
I donāt think it is a Chime issue after the last experiment. Itās not clear where the issue is. Thanks for investigating
Hi I am getting the following errors when i try to use the say command on my sonos with google translate which otherwise works normaly
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/chime_tts/helpers.py:419
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: January 24, 2024 at 22:36:06 (3 occurrences)
Last logged: 22:30:24
[139963216155456] Error handling message: Unknown error (unknown_error) John from 192.168.1.10 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
[139962675933120] Error handling message: Unknown error (unknown_error) John from 192.168.1.10 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 782, in handle_execute_script
script_result = await script_obj.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1587, in async_run
return await asyncio.shield(run.async_run())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 426, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 479, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 502, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 713, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 675, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 112, in async_say
result = await start_queue(service, hass, async_say_execute)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 384, in start_queue
result = await asyncio.wait_for(task, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
return fut.result()
^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 143, in async_say_execute
play_result = await async_play_media(
^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 1039, in async_play_media
group_members_suppored = helpers.get_group_members_suppored(media_players_array)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers.py", line 419, in get_group_members_suppored
if media_player_dict["group_member_support"] is True:
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'group_member_support'
This error originated from a custom integration.
Logger: custom_components.chime_tts
Source: custom_components/chime_tts/__init__.py:367
Integration: Chime TTS (documentation, issues)
First occurred: January 24, 2024 at 18:56:37 (9 occurrences)
Last logged: January 24, 2024 at 22:40:02
Timeout reached on queued job #9.
Timeout reached on queued job #11.
Timeout reached on queued job #13.
Timeout reached on queued job #15.
Timeout reached on queued job #17.
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/chime_tts/helpers.py:44
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: January 24, 2024 at 18:53:43 (7 occurrences)
Last logged: January 24, 2024 at 22:35:13
[139963406359232] Error handling message: Unknown error (unknown_error) John from 192.168.1.10 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
[139962772657216] Error handling message: Unknown error (unknown_error) John from 192.168.1.10 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
[139963216155456] Error handling message: Unknown error (unknown_error) John from 192.168.1.10 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 782, in handle_execute_script
script_result = await script_obj.async_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1587, in async_run
return await asyncio.shield(run.async_run())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 426, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 479, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 502, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 713, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 675, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 112, in async_say
result = await start_queue(service, hass, async_say_execute)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 384, in start_queue
result = await asyncio.wait_for(task, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
return fut.result()
^^^^^^^^^^^^
File "/config/custom_components/chime_tts/__init__.py", line 129, in async_say_execute
options = helpers.parse_options_yaml(service.data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/chime_tts/helpers.py", line 44, in parse_options_yaml
options = yaml.safe_load(options_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/__init__.py", line 125, in safe_load
return load(stream, SafeLoader)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/__init__.py", line 79, in load
loader = Loader(stream)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/loader.py", line 34, in __init__
Reader.__init__(self, stream)
File "/usr/local/lib/python3.11/site-packages/yaml/reader.py", line 85, in __init__
self.determine_encoding()
File "/usr/local/lib/python3.11/site-packages/yaml/reader.py", line 124, in determine_encoding
self.update_raw()
File "/usr/local/lib/python3.11/site-packages/yaml/reader.py", line 178, in update_raw
data = self.stream.read(size)
^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'read'
Iām trying to get this to work with my HomePod. It works fine when I just have a tts message. However when I ask it to add a default chime before the tts message, it throws an error.
configuration:
service: chime_tts.say
metadata: {}
data:
tts_playback_speed: 100
tts_platform: cloud
message: Package detected
gender: female
cache: true
volume_level: 0.74
chime_path: chord
target:
entity_id: media_player.living_room_homepod
error:
2024-01-25 16:34:21.238 ERROR (MainThread) [custom_components.chime_tts] An unexpected error occurred when playing the audio: (āfailed to init decoderā, -1)
any idea what to do?
edit: when I change the chime from āChordā to āBellsā it works. there must be something wrong with the encoding of that snippet?
Hi @sundar2012. Iām also using HomePods (mini) and iāve never had any issues with any of the preset chime sounds. Perhaps try the following:
audio_conversion
field. Maybe this would address any encoding issues? But as Iāve said: Iāve never had an issue and iām also using HomePods.media_player.play_media
. If it fails there too then either the file is likely the issue.Have a new interesting problem @Nimrod_Dolev - this has only started sometime in the last week.
Here are my logs - and nowhere in here do I see anything suggesting chime_tts is the cause.
2024-01-27 16:38:14.586 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v0.12.1-beta1 -----
2024-01-27 16:38:14.587 DEBUG (MainThread) [custom_components.chime_tts] Service call #0 was added to the queue.
2024-01-27 16:38:14.587 DEBUG (MainThread) [custom_components.chime_tts] Executing queued job #0
2024-01-27 16:38:14.589 INFO (MainThread) [custom_components.chime_tts.helpers] Media player entity "media_player.greenroom_speaker" is turned off. Turning on...
2024-01-27 16:38:14.593 INFO (MainThread) [custom_components.chime_tts.helpers] Media player entity "media_player.bedroom_clock" is turned off. Turning on...
2024-01-27 16:38:17.244 INFO (MainThread) [custom_components.chime_tts.helpers] Media player entity "media_player.store_room_nest_speaker" is turned off. Turning on...
2024-01-27 16:38:17.253 INFO (MainThread) [custom_components.chime_tts.helpers] Media player entity "media_player.hall_speaker" is turned off. Turning on...
2024-01-27 16:38:17.256 INFO (MainThread) [custom_components.chime_tts.helpers] Media player entity "media_player.livingroom_smart_display" is turned off. Turning on...
2024-01-27 16:38:19.687 INFO (MainThread) [custom_components.chime_tts.helpers] Media player entity "media_player.kitchen_nest" is turned off. Turning on...
2024-01-27 16:38:19.695 DEBUG (MainThread) [custom_components.chime_tts.helpers] ----- General Parameters -----
2024-01-27 16:38:19.695 DEBUG (MainThread) [custom_components.chime_tts.helpers] * entity_ids = ['media_player.greenroom_speaker', 'media_player.bedroom_clock', 'media_player.store_room_nest_speaker', 'media_player.hall_speaker', 'media_player.livingroom_smart_display', 'media_player.kitchen_nest']
2024-01-27 16:38:19.695 DEBUG (MainThread) [custom_components.chime_tts.helpers] * chime_path = custom_chime_path_1
2024-01-27 16:38:19.695 DEBUG (MainThread) [custom_components.chime_tts.helpers] * end_chime_path =
2024-01-27 16:38:19.695 DEBUG (MainThread) [custom_components.chime_tts.helpers] * cache = True
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts.helpers] * delay = 450.0
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts.helpers] * final_delay = 500.0
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts.helpers] * message = Attention. Someone just opened the Garden Gate
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts.helpers] * tts_platform = tts.piper
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts.helpers] * tts_playback_speed = 100.0
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts.helpers] * announce = True
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts.helpers] * volume_level = 0.68
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts.helpers] * join_players = False
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts.helpers] * unjoin_players = False
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts] async_get_playback_audio_path
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts] Attempting to retrieve generated mp3 file from cache
2024-01-27 16:38:19.696 DEBUG (MainThread) [custom_components.chime_tts] Using previously generated mp3 saved in cache
2024-01-27 16:38:19.697 DEBUG (MainThread) [custom_components.chime_tts] - audio_dict = {'audio_path': '/media/sounds/temp/chime_tts/cp8jfzso.mp3', 'audio_duration': 6.539}
2024-01-27 16:38:19.697 DEBUG (MainThread) [custom_components.chime_tts] - Setting 'media_player.greenroom_speaker' volume level to 0.68
2024-01-27 16:38:19.697 DEBUG (MainThread) [custom_components.chime_tts] - async_set_volume_level("media_player.greenroom_speaker", 0.68)
2024-01-27 16:38:19.697 DEBUG (MainThread) [custom_components.chime_tts] - Seting volume_level of media player "media_player.greenroom_speaker" to: 0.68
2024-01-27 16:38:19.707 DEBUG (MainThread) [custom_components.chime_tts] - Volume set
2024-01-27 16:38:19.707 DEBUG (MainThread) [custom_components.chime_tts] - Setting 'media_player.bedroom_clock' volume level to 0.68
2024-01-27 16:38:19.707 DEBUG (MainThread) [custom_components.chime_tts] - async_set_volume_level("media_player.bedroom_clock", 0.68)
2024-01-27 16:38:19.708 DEBUG (MainThread) [custom_components.chime_tts] - Seting volume_level of media player "media_player.bedroom_clock" to: 0.68
2024-01-27 16:38:19.713 DEBUG (MainThread) [custom_components.chime_tts] - Volume set
2024-01-27 16:38:19.713 DEBUG (MainThread) [custom_components.chime_tts] - Setting 'media_player.store_room_nest_speaker' volume level to 0.68
2024-01-27 16:38:19.713 DEBUG (MainThread) [custom_components.chime_tts] - async_set_volume_level("media_player.store_room_nest_speaker", 0.68)
2024-01-27 16:38:19.713 DEBUG (MainThread) [custom_components.chime_tts] - Seting volume_level of media player "media_player.store_room_nest_speaker" to: 0.68
2024-01-27 16:38:19.716 DEBUG (MainThread) [custom_components.chime_tts] - Volume set
2024-01-27 16:38:19.716 DEBUG (MainThread) [custom_components.chime_tts] - Setting 'media_player.hall_speaker' volume level to 0.68
2024-01-27 16:38:19.716 DEBUG (MainThread) [custom_components.chime_tts] - async_set_volume_level("media_player.hall_speaker", 0.68)
2024-01-27 16:38:19.716 DEBUG (MainThread) [custom_components.chime_tts] - Seting volume_level of media player "media_player.hall_speaker" to: 0.68
2024-01-27 16:38:19.725 DEBUG (MainThread) [custom_components.chime_tts] - Volume set
2024-01-27 16:38:19.725 DEBUG (MainThread) [custom_components.chime_tts] - Setting 'media_player.livingroom_smart_display' volume level to 0.68
2024-01-27 16:38:19.725 DEBUG (MainThread) [custom_components.chime_tts] - async_set_volume_level("media_player.livingroom_smart_display", 0.68)
2024-01-27 16:38:19.725 DEBUG (MainThread) [custom_components.chime_tts] - Seting volume_level of media player "media_player.livingroom_smart_display" to: 0.68
2024-01-27 16:38:19.727 DEBUG (MainThread) [custom_components.chime_tts] - Volume set
2024-01-27 16:38:19.727 DEBUG (MainThread) [custom_components.chime_tts] - Setting 'media_player.kitchen_nest' volume level to 0.68
2024-01-27 16:38:19.728 DEBUG (MainThread) [custom_components.chime_tts] - async_set_volume_level("media_player.kitchen_nest", 0.68)
2024-01-27 16:38:19.728 DEBUG (MainThread) [custom_components.chime_tts] - Seting volume_level of media player "media_player.kitchen_nest" to: 0.68
2024-01-27 16:38:19.730 DEBUG (MainThread) [custom_components.chime_tts] - Volume set
2024-01-27 16:38:19.730 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media service with data:
2024-01-27 16:38:19.730 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2024-01-27 16:38:19.730 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/cp8jfzso.mp3
2024-01-27 16:38:19.730 DEBUG (MainThread) [custom_components.chime_tts] - announce: True
2024-01-27 16:38:19.731 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.greenroom_speaker', 'media_player.bedroom_clock', 'media_player.store_room_nest_speaker', 'media_player.hall_speaker', 'media_player.livingroom_smart_display', 'media_player.kitchen_nest']
2024-01-27 16:38:21.367 DEBUG (MainThread) [custom_components.chime_tts] ...media_player.play_media completed.
2024-01-27 16:38:21.367 DEBUG (MainThread) [custom_components.chime_tts] Waiting 6.539s for audio playback to complete...
2024-01-27 16:38:27.908 DEBUG (MainThread) [custom_components.chime_tts] Waiting 0.5s for final_delay to complete...
2024-01-27 16:38:28.409 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 13819.913 ms -----
2024-01-27 16:38:28.409 DEBUG (MainThread) [custom_components.chime_tts] Removing current queued service call.
2024-01-27 16:38:28.409 DEBUG (MainThread) [custom_components.chime_tts] Queue emptied. Reinitializing values.
All looks normal right?
Now - the interesting thing, is that after chime_tts has done itās thing, the media player in the Livingroom starts playing music, and looking at the states page I can see the source looks to be Music Assistant that the music is coming from. I thought I would mention it to you first in case you spot anything in your code that might cause this, before I go and pester the author of Music Assistantā¦
Hey Andrew,
Behind the scenes, Chime TTS plays the generated mp3s via Home Assistantās native media_player.play_media
service.
If there was music playing before the service call to chime_tts.say
and the announce
field was set to true
, Home Assistant tries to resume the previously playing media on the speaker/s once the service call completes (this is the normal behaviour of the announce
feature).
While I canāt say for sure, given the limited information in your post, but I donāt think it is Chime TTS directly causing the issue, but either with the announce
feature itself or perhaps Music Assistant.
So interestingly - Iāve done some more troubleshooting.
If I use the service calls tool in the developer pages -
a call to either TTS cloud say, or Google Translate - plays the speech and then nothing else happens afterwards, as expected.
The Speak service though, when I select piper TTS, causes this to happen, other speak integrations might too, but I can only select piper TTS from this list.
So yes itās either Home Assistant, or Music Assistant that is the culprit.
Hi @mefistofelis,
I added a fix in the latest release, v0.13.0. Please upgrade Chime TTS and then let me know if youāre still experiencing the issue.
Works like a charm, thx. Keep up the good work