Allow to pass YandexTTS options via sevice call (#10578)

This commit is contained in:
Andrey authored and Paulus Schoutsen committed 2017-11-16 09:10:25 -08:00
1 parent bd5a16d70b
commit 072ed7ea13
3 files changed
+57 -6

No files matched your search

+3 -2
View File
@@ -286,10 +286,11 @@ class SpeechManager(object):
options = options or provider.default_options
if options is not None:
invalid_opts = [opt_name for opt_name in options.keys()
if opt_name not in provider.supported_options]
if opt_name not in (provider.supported_options or
[])]
if invalid_opts:
raise HomeAssistantError(
"Invalid options found: %s", invalid_opts)
"Invalid options found: {}".format(invalid_opts))
options_key = ctypes.c_size_t(hash(frozenset(options))).value
else:
options_key = '-'