Jcarlier
(Carlier Jacques)
November 10, 2023, 5:47pm
1
installed chime tts …
release 2023.11
media player: google mini
error:
ogger: custom_components.chime_tts
Source: custom_components/chime_tts/__init__.py:1003
Integration: Chime TTS ([documentation](https://www.github.com/nimroddolev/chime_tts/wiki), [issues](https://github.com/nimroddolev/chime_tts/issues))
First occurred: 18:31:02 (1 occurrences)
Last logged: 18:31:02
An error occurred: Unknown source directory.
my yaml:
service: chime_tts.say
data:
tts_platform: google_translate
message: Hello world!
chime_path: custom_components/chime_tts/mp3s/drumroll.mp3
end_chime_path: custom_components/chime_tts/mp3s/tada.mp3
target:
entity_id: media_player.cuisine
have you an explanation
nickrout
(Nick Rout)
November 10, 2023, 8:07pm
2
It is a custom integration, go ask on their github.
Hi @Jcarlier ,
The issue may be with the permissions of your media folder. You can try adding the following to your configuration.yaml file, restart Home Assistant and then see if the issue persists:
homeassistant:
media_dirs:
local: /media
If that’s not the issue, you should enable debug logging for the Chime TTS integration, and share the full debug logs to hopefully show what the issue might be:
Turn on debug logging:
service: logger.set_level
data:
custom_components.chime_tts: debug
Call the chime_tts.say
service again.
Check your log messages in Home Assistant:
https://{YOUR_HOME_ASSISTANT_ADDRESS}:8123/config/logs?filter=chime_tts
and then click LOAD FULL LOGS
Jcarlier
(Carlier Jacques)
November 11, 2023, 11:25am
4
2023-11-11 12:03:30.157 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
2023-11-11 12:20:50.557 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Called. Version v0.8.0 -----
2023-11-11 12:20:50.557 DEBUG (MainThread) [custom_components.chime_tts] Service call #0 was added to the queue.
2023-11-11 12:20:50.557 DEBUG (MainThread) [custom_components.chime_tts] Executing queued job #0
2023-11-11 12:20:50.558 INFO (MainThread) [custom_components.chime_tts] Media player entity "media_player.cuisine" is turned off. Turning on...
2023-11-11 12:20:50.568 DEBUG (MainThread) [custom_components.chime_tts] ----- General Parameters -----
2023-11-11 12:20:50.568 DEBUG (MainThread) [custom_components.chime_tts] * entity_ids = ['media_player.cuisine']
2023-11-11 12:20:50.569 DEBUG (MainThread) [custom_components.chime_tts] * hass = <HomeAssistant RUNNING>
2023-11-11 12:20:50.569 DEBUG (MainThread) [custom_components.chime_tts] * chime_path = custom_components/chime_tts/mp3s/drumroll.mp3
2023-11-11 12:20:50.569 DEBUG (MainThread) [custom_components.chime_tts] * cache = False
2023-11-11 12:20:50.569 DEBUG (MainThread) [custom_components.chime_tts] * delay = 450.0
2023-11-11 12:20:50.569 DEBUG (MainThread) [custom_components.chime_tts] * message = Hello world!
2023-11-11 12:20:50.569 DEBUG (MainThread) [custom_components.chime_tts] * tts_platform = google_translate
2023-11-11 12:20:50.569 DEBUG (MainThread) [custom_components.chime_tts] * tts_playback_speed = 100.0
2023-11-11 12:20:50.569 DEBUG (MainThread) [custom_components.chime_tts] * announce = False
2023-11-11 12:20:50.570 DEBUG (MainThread) [custom_components.chime_tts] * volume_level = -1.0
2023-11-11 12:20:50.570 DEBUG (MainThread) [custom_components.chime_tts] * join_players = False
2023-11-11 12:20:50.570 DEBUG (MainThread) [custom_components.chime_tts] * unjoin_players = False
2023-11-11 12:20:50.570 DEBUG (MainThread) [custom_components.chime_tts] ----- TTS-Specific Params -----
2023-11-11 12:20:50.570 DEBUG (MainThread) [custom_components.chime_tts] -------------------------------
2023-11-11 12:20:50.570 INFO (MainThread) [custom_components.chime_tts] Media player entity "media_player.cuisine" is turned off. Turning on...
2023-11-11 12:20:50.578 DEBUG (MainThread) [custom_components.chime_tts] async_get_playback_audio_path
2023-11-11 12:20:50.578 DEBUG (MainThread) [custom_components.chime_tts] get_audio_from_path("custom_components/chime_tts/mp3s/drumroll.mp3", 0, audio)
2023-11-11 12:20:50.579 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "custom_components/chime_tts/mp3s/drumroll.mp3"...
2023-11-11 12:20:51.029 DEBUG (MainThread) [custom_components.chime_tts] - ...audio with duration 1.992s retrieved successfully
2023-11-11 12:20:51.029 DEBUG (MainThread) [custom_components.chime_tts] async_request_tts_audio(hass, tts_platform = google_translate, message = Hello world!, tts_playback_speed = 100.0, cache = False, language = None)
2023-11-11 12:20:51.029 DEBUG (MainThread) [custom_components.chime_tts] - Generating TTS audio...
2023-11-11 12:20:52.010 DEBUG (MainThread) [custom_components.chime_tts] - ...TTS audio completed in 980.3539999999999 ms
2023-11-11 12:20:52.020 DEBUG (MainThread) [custom_components.chime_tts] - Final audio created:
2023-11-11 12:20:52.020 DEBUG (MainThread) [custom_components.chime_tts] - Duration = 3.882s
2023-11-11 12:20:52.024 DEBUG (MainThread) [custom_components.chime_tts] Creating final audio file
2023-11-11 12:20:52.027 DEBUG (MainThread) [custom_components.chime_tts] - Audio folder exists: /media/sounds/temp/chime_tts/
2023-11-11 12:20:52.027 DEBUG (MainThread) [custom_components.chime_tts] - Creating mp3 file...
2023-11-11 12:20:52.032 DEBUG (MainThread) [custom_components.chime_tts] - temp_obj = <tempfile._TemporaryFileWrapper object at 0x7f2e3e64d0>
2023-11-11 12:20:52.034 DEBUG (MainThread) [custom_components.chime_tts] - Filepath = '/media/sounds/temp/chime_tts/ex7nffte.mp3'
2023-11-11 12:20:52.438 DEBUG (MainThread) [custom_components.chime_tts] - File saved successfully
2023-11-11 12:20:52.438 DEBUG (MainThread) [custom_components.chime_tts] - audio_dict = {'audio_path': '/media/sounds/temp/chime_tts/ex7nffte.mp3', 'audio_duration': 3.882}
2023-11-11 12:20:52.438 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media service with data:
2023-11-11 12:20:52.439 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2023-11-11 12:20:52.439 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/ex7nffte.mp3
2023-11-11 12:20:52.439 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.cuisine']
2023-11-11 12:20:52.482 WARNING (MainThread) [custom_components.chime_tts] An error occurred: Unknown source directory.
2023-11-11 12:20:52.483 DEBUG (MainThread) [custom_components.chime_tts] Waiting 3.882s for audio playback to complete...
2023-11-11 12:20:56.368 DEBUG (MainThread) [custom_components.chime_tts] Final URL = http://192.168.0.195:8123/media/sounds/temp/chime_tts/ex7nffte.mp3
2023-11-11 12:20:56.369 DEBUG (MainThread) [custom_components.chime_tts] ----- Chime TTS Say Completed in 5809.978 ms -----
2023-11-11 12:20:56.369 DEBUG (MainThread) [custom_components.chime_tts] Removing current queued service call.
2023-11-11 12:20:56.369 DEBUG (MainThread) [custom_components.chime_tts] Queue emptied. Reinitializing values.
Jcarlier
(Carlier Jacques)
November 11, 2023, 11:28am
5
homeassistant:
media_dirs:
media: /media
Thanks for the logs
It looks like Chime TTS successfully generates the audio from Chime TTS, but your HA instance won’t play the media file.
It wasn’t clear from your messages - are you still having issues even after adding the media folder?
Jcarlier
(Carlier Jacques)
November 11, 2023, 2:28pm
8
2023-11-11 14:45:19.084 WARNING (SyncWorker_3) [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
???
This is the standard warning from Home Assistant for any 3rd party integration. It by itself does not mean there are any issues.
Jcarlier
(Carlier Jacques)
November 11, 2023, 2:41pm
10
just retry
service: chime_tts.say
data:
tts_platform: google_translate
message: Hello world! Hello world! Hello world!
chime_path: mp3_path_placeholder-bells_2
target:
entity_id: media_player.cuisine
error:
.................................................
2023-11-11 15:34:32.445 DEBUG (MainThread) [custom_components.chime_tts] - Retrieving audio from path: "custom_components/chime_tts/mp3s/bells_2.mp3"...
2023-11-11 15:34:32.775 DEBUG (MainThread) [custom_components.chime_tts] - ...audio with duration 1.279s retrieved successfully
2023-11-11 15:34:32.775 DEBUG (MainThread) [custom_components.chime_tts] async_request_tts_audio(hass, tts_platform = google_translate, message = Hello world! Hello world! Hello world!, tts_playback_speed = 100.0, cache = False, language = None)
2023-11-11 15:34:32.775 DEBUG (MainThread) [custom_components.chime_tts] - Generating TTS audio...
2023-11-11 15:34:33.125 DEBUG (MainThread) [custom_components.chime_tts] - ...TTS audio completed in 350.392 ms
2023-11-11 15:34:33.139 DEBUG (MainThread) [custom_components.chime_tts] - Final audio created:
2023-11-11 15:34:33.140 DEBUG (MainThread) [custom_components.chime_tts] - Duration = 5.425s
2023-11-11 15:34:33.140 DEBUG (MainThread) [custom_components.chime_tts] Creating final audio file
2023-11-11 15:34:33.141 DEBUG (MainThread) [custom_components.chime_tts] - Audio folder exists: /media/sounds/temp/chime_tts/
2023-11-11 15:34:33.141 DEBUG (MainThread) [custom_components.chime_tts] - Creating mp3 file...
2023-11-11 15:34:33.142 DEBUG (MainThread) [custom_components.chime_tts] - temp_obj = <tempfile._TemporaryFileWrapper object at 0x7f9abac750>
2023-11-11 15:34:33.143 DEBUG (MainThread) [custom_components.chime_tts] - Filepath = '/media/sounds/temp/chime_tts/f5gfknlv.mp3'
2023-11-11 15:34:33.576 DEBUG (MainThread) [custom_components.chime_tts] - File saved successfully
2023-11-11 15:34:33.576 DEBUG (MainThread) [custom_components.chime_tts] - audio_dict = {'audio_path': '/media/sounds/temp/chime_tts/f5gfknlv.mp3', 'audio_duration': 5.425}
2023-11-11 15:34:33.577 DEBUG (MainThread) [custom_components.chime_tts] Calling media_player.play_media service with data:
2023-11-11 15:34:33.577 DEBUG (MainThread) [custom_components.chime_tts] - media_content_type: music
2023-11-11 15:34:33.577 DEBUG (MainThread) [custom_components.chime_tts] - media_content_id: media-source://media_source/local/sounds/temp/chime_tts/f5gfknlv.mp3
2023-11-11 15:34:33.577 DEBUG (MainThread) [custom_components.chime_tts] - entity_id: ['media_player.cuisine']
2023-11-11 15:34:33.612 WARNING (MainThread) [custom_components.chime_tts] An error occurred: Unknown source directory.
-----------------------------------------------------------------------------------------------------------------------------
media-source://media_source/local/sounds/temp/chime_tts/f5gfknlv.mp3 ??????????
why f5....mp3 ???
Jcarlier
(Carlier Jacques)
November 11, 2023, 2:44pm
11
media-source://media_source/local/sounds/temp/ ???
The integration generates a new mp3 file and stores it in your Home Assistant’s media folder
Jcarlier
(Carlier Jacques)
November 11, 2023, 2:51pm
13
i see the folder " /media/sounds/temp/chime_tts" very strange !!
Jcarlier
(Carlier Jacques)
November 11, 2023, 2:53pm
14
i think i have a problem with “media_content_id: media-source://media_source/local/sounds/temp/chime_tts/f5gfknlv.mp3” but i don’t find it
Jcarlier
(Carlier Jacques)
November 11, 2023, 2:59pm
15
when i send a message to my google mini (media-player.cuisine)
i use:
service: tts.google_translate_say
data:
cache: false
entity_id: media_player.cuisine
language: fr
message: test
and everyting is ok
Jcarlier
(Carlier Jacques)
November 11, 2023, 3:08pm
16
i just tested (i have loaded bells-2.mp3 into temp/…: )
service: media_player.play_media
data:
entity_id: media_player.cuisine
media_content_id: media-source://media_source/local/sounds/temp/chime_tts/bells_2.mp3
media_content_type: music
and same error:
Échec de l’appel du service media_player.play_media. Unknown source directory.
Jcarlier
(Carlier Jacques)
November 11, 2023, 3:09pm
17
maybe error is inside my ha but i don’t see where ?
thanks
The file is being written successfully by Chime TTS to your media folder (e.g: from your debug logs: /media/sounds/temp/chime_tts/f5gfknlv.mp3
), however the media_player.play_media
service call cannot read the folder (Unknown source directory
). So again, it seems to me that the issue is with permissions to the media folder.
If my suggestion of adding the media folder to the media_dirs
section of your configuration.yaml
file did not work, I am afraid I don’t know of anythign else to try. Perhaps you should search the forum for posts relating to issues playing files from the media folder.
Jcarlier
(Carlier Jacques)
November 13, 2023, 10:03am
19
ok i found the solution
in config.yaml:
media_dirs:
local: /media
and not
media_dirs:
media: /media
thanks for your support
now i am going to test on echo.dot
Excellent, let me know if it works or not