mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Allow different voices in Watson TTS calls (#56811)
This commit is contained in:
parent
7d6ad6e5e3
commit
b49b975999
@ -191,7 +191,9 @@ class WatsonTTSProvider(Provider):
|
||||
def get_tts_audio(self, message, language=None, options=None):
|
||||
"""Request TTS file from Watson TTS."""
|
||||
response = self.service.synthesize(
|
||||
text=message, accept=self.output_format, voice=self.default_voice
|
||||
text=message,
|
||||
accept=self.output_format,
|
||||
voice=options.get(CONF_VOICE, self.default_voice),
|
||||
).get_result()
|
||||
|
||||
return (CONTENT_TYPE_EXTENSIONS[self.output_format], response.content)
|
||||
|
Loading…
x
Reference in New Issue
Block a user