1
mirror of https://github.com/home-assistant/core synced 2024-07-12 07:21:24 +02:00

Address Watson TTS review comment (#58277)

This commit is contained in:
Franck Nijhof 2021-10-23 12:14:15 +02:00 committed by GitHub
parent 513c90123e
commit e38754a836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,9 +191,7 @@ 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=options.get(CONF_VOICE, self.default_voice),
text=message, accept=self.output_format, voice=options[CONF_VOICE]
).get_result()
return (CONTENT_TYPE_EXTENSIONS[self.output_format], response.content)