mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Move imports to top for watson_tts (#29023)
This commit is contained in:
parent
5822deda1d
commit
fe9084bb3b
@ -1,6 +1,8 @@
|
|||||||
"""Support for IBM Watson TTS integration."""
|
"""Support for IBM Watson TTS integration."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from ibm_watson import TextToSpeechV1
|
||||||
|
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.tts import PLATFORM_SCHEMA, Provider
|
from homeassistant.components.tts import PLATFORM_SCHEMA, Provider
|
||||||
@ -92,8 +94,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||||||
|
|
||||||
def get_engine(hass, config, discovery_info=None):
|
def get_engine(hass, config, discovery_info=None):
|
||||||
"""Set up IBM Watson TTS component."""
|
"""Set up IBM Watson TTS component."""
|
||||||
from ibm_watson import TextToSpeechV1
|
|
||||||
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
|
|
||||||
|
|
||||||
authenticator = IAMAuthenticator(config[CONF_APIKEY])
|
authenticator = IAMAuthenticator(config[CONF_APIKEY])
|
||||||
service = TextToSpeechV1(authenticator)
|
service = TextToSpeechV1(authenticator)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user