Fixing #27722 Watson TTS platform (sdk upgrade) (#28468)

This commit is contained in:
András Rutkai authored and Paulus Schoutsen committed 2019-11-02 21:24:02 -07:00
1 parent 0d432f60e2
commit 31752d5736
3 files changed
+6 -3

No files matched your search

@@ -3,7 +3,7 @@
"name": "IBM Watson TTS",
"documentation": "https://www.home-assistant.io/integrations/watson_tts",
"requirements": [
"ibm-watson==3.0.3"
"ibm-watson==4.0.1"
],
"dependencies": [],
"codeowners": [
+4 -1
View File
@@ -93,8 +93,11 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def get_engine(hass, config):
"""Set up IBM Watson TTS component."""
from ibm_watson import TextToSpeechV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
service = TextToSpeechV1(url=config[CONF_URL], iam_apikey=config[CONF_APIKEY])
authenticator = IAMAuthenticator(config[CONF_APIKEY])
service = TextToSpeechV1(authenticator)
service.set_service_url(config[CONF_URL])
supported_languages = list({s[:5] for s in SUPPORTED_VOICES})
default_voice = config[CONF_VOICE]
+1 -1
View File
@@ -685,7 +685,7 @@ hydrawiser==0.1.1
iaqualink==0.3.0
# homeassistant.components.watson_tts
ibm-watson==3.0.3
ibm-watson==4.0.1
# homeassistant.components.watson_iot
ibmiotf==0.3.4