Closed hjri closed 11 months ago
HI @hjri,
Thank you for your suggestions.
I plan to add customizable options to Chime TTS which include options to customize the media directories:
In addition to adding documentation for the above options, I will also add the ffmpeg requirement and guidance for how to use custom chimes outside of the integration's folder.
@nimroddolev Could you walk me through this as if I were dumb? Because I am.
If we use custom mp3s, are we now supposed to have them live in local
? If I have a folder in /www/media/customSounds/
that contains my library, would I insert that path in the Media Folder option? If so, how does this impact having the mp3s appear in the options list? I was adding each mp3 to the four different code blocks inservices.yaml
to have them appear as options, but it seems like the update wiped that.
Hi @jordanlambrecht. You're not dumb! It's not clear cut, and i'm happy to go through it:
You're correct: custom chime mp3s need to be in your local
folder. So for example, if you wanted to use a custom chime from your www
folder you would call the chime_tts.say
service and specify it like this:
service: chime_tts.say
data:
chime_path: /config/www/media/customSounds/my_custom_chime.mp3
message: This is a test
tts_platform: google_translate
language: en
target:
entity_id: media_player.my_speaker
Note that the chime_path
value in the YAML above begins with /config
, as you need to specify an absolute file path.
As you already found out: the chime options list UI cannot be changed without editing the integration's source code, and upgrading the integration erases these changes as the chime list UI is part of the source code. This is a limitation of the way integrations work in Home Assistant, and unfortunately I cannot expose the chime list for users to edit and for those changes to persist.
All that being said: what I could do is to add additional placeholder chime options to the list UI (eg: "Custom 1", "Custom 2", "Custom 3"...), which would act as placeholders to custom mp3 paths. You could enter the file paths for these placeholders to in the integration's configuration dialog. Once the paths are saved in the configuration, they would persist after upgrading the integration in the future.
The limitation to this solution is that it would not be possible to rename the custom chimes names as they appears in the list UI unless you modify the source code, but then you have the same issue where upgrading the integration would reset the names back to "Custom 1", "Custom 2", etc.
I have released a new version (v0.10) which implements this solution for custom chimes and I've updated the wiki to help explain how to use it. Feel free to let me know if you have any other thoughts 👍
Thanks @nimroddolev, you're awesome and I appreciate you.
Thank you for that, I'm glad to help 👍
Checklist
Is your feature request related to a problem? Please describe.
It's incredibly frustrating setting this extension. It has some prerequisites that are not stated anywhere in wiki/readme, or i was unable to find them. In my setup it just doesn't work and digging through the logs to find out what is wrong and having to dig through the sourcecode to find out what it wants is suboptimal
Describe the solution you'd like
ffmpeg
is neededmedia_dirs
and/or allow use of non-default ones.media_dirs
and/or local filesystem.Describe alternatives you've considered
Not using the addon at all.
Additional context
No additional context.