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?
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?
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.
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 ???
media-source://media_source/local/sounds/temp/ ???
The integration generates a new mp3 file and stores it in your Home Assistant’s media folder
i see the folder " /media/sounds/temp/chime_tts" very strange !!
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
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
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.
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.
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
it does not work .
maybe only with nabu casa??
using the alexa player poses a lot of problems I can’t send an mp3 or a radio browser with my echo dot I think you need to register on nabu casa?? I don’t have all these problems with a google player
alias: chime tts on alexa player
sequence:
- service: chime_tts.say_url
data:
chime_path: mp3_path_placeholder-bells_2
tts_platform: google_translate
message: This is a Chime TTS test on Alexa speakers
language: en
response_variable: chime_tts
- service: notify.alexa_media
data:
message: |
<audio src='{{chime_tts.url}}'/>
target:
- media_player.echo_dot_carlier
data:
type: tts
mode: single
get the message : chime tts on alexia player triggered
and after :
strange audio script response:
‘sorry I can’t access the script…at the moment!!!’
I don’t have any Alexa speakers so unfortunately I can’t help you troubleshoot these hardware issues.
I suggest you search the forum specifically for playing mp3s on Alexa speakers, I am sure you’re not the only one with this issue.
Good morning everyone, i use chime tts on home assistant, everything goes very well until at some point even forcing the various scripts where i start the tts over the mp3 stored locally the whole thing stops. i installed the beta version hoping this would fix the problem but nothing. everything works until after n times it stops working. i attach the logs this way you tell me what you think. i think that when he wants to start and finds the media. player stay inactive it puts the task in the queue and does nothing else… from there on all scripts will go in the queue. i tried using clear cache but nothing changes, the only way to restart it is to restart HA which is probably equivalent to clearing the queue. is there a command i could use before fixing the queue? or just make it so that if it finds unknown the mediaplayer status it forces the volume for how i put the script in. below i also put the script example
service: chime_tts.say
target:
device_id:
- 390a59438e130f9ca39bf2d7b654bb7c
data:
message: Sono le tredici e trenta minuti, sto chiudendo le tende dell open Space
volume_level: 0.5
chime_path: /config/www/musica/IronMan_backinblack_cut_11s.mp3
offset: -10000
tts_speed: 110