Use speak2mary for MaryTTS integration and enable sound effects#30805
Conversation
| @property | ||
| def default_options(self): | ||
| """Return dict include default options.""" | ||
| return {CONF_EFFECT: DEFAULT_EFFECTS} |
There was a problem hiding this comment.
Why is that static? The user can overwrite the defaults per initial config
There was a problem hiding this comment.
Jup, you are correct. With the latest commit, the defaults are the initial effect settings
| return (None, None) | ||
| data = await request.read() | ||
| if options is not None and CONF_EFFECT in options: | ||
| effects.update(options[CONF_EFFECT]) |
There was a problem hiding this comment.
that means, you will be never able to overwrite the effects from config. Maybe:
effects = options[CONF_EFFECT]?
There was a problem hiding this comment.
I understood the options parameter as additional options during the service call.
Can you explain where the options parameter get its value?
I intended to use the config from yaml and let it be overwritten by service call options.
There was a problem hiding this comment.
options are they from the service call. I want only prevent to have a bug :)
There was a problem hiding this comment.
Since the file config is coming as default, it will change it to your suggestion.
Breaking Change:
The
codecandlocaleconfiguration changed to the official config keys from MaryTTS.en-GB,en-US->en_GB,en_USaiff,au,wav->AIFF_FILE,AU_FILE,WAVE_FILEDescription:
I extracted the MaryTTS network logic into a external package and added the effects settings.
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#11759
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest.requirements_all.txtby runningpython3 -m script.gen_requirements_all..coveragerc.If the code does not interact with devices: