This commit is contained in:
Fabian Affolter 2017-01-15 14:53:07 +01:00 committed by GitHub
parent e00e6f9db6
commit 2465aea63b
3 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@
Support for the google speech service.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/tts/google/
https://home-assistant.io/components/tts.google/
"""
import asyncio
import logging
@ -41,12 +41,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_get_engine(hass, config):
"""Setup Google speech component."""
"""Set up Google speech component."""
return GoogleProvider(hass, config[CONF_LANG])
class GoogleProvider(Provider):
"""Google speech api provider."""
"""The Google speech API provider."""
def __init__(self, hass, lang):
"""Init Google TTS service."""

View File

@ -25,7 +25,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def get_engine(hass, config):
"""Setup pico speech component."""
"""Set up Pico speech component."""
if shutil.which("pico2wave") is None:
_LOGGER.error("'pico2wave' was not found")
return False

View File

@ -2,7 +2,7 @@
Support for the voicerss speech service.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/tts/voicerss/
https://home-assistant.io/components/tts.voicerss/
"""
import asyncio
import logging
@ -83,12 +83,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_get_engine(hass, config):
"""Setup VoiceRSS speech component."""
"""Set up VoiceRSS TTS component."""
return VoiceRSSProvider(hass, config)
class VoiceRSSProvider(Provider):
"""VoiceRSS speech api provider."""
"""The VoiceRSS speech API provider."""
def __init__(self, hass, conf):
"""Init VoiceRSS TTS service."""
@ -115,7 +115,7 @@ class VoiceRSSProvider(Provider):
@asyncio.coroutine
def async_get_tts_audio(self, message, language):
"""Load TTS from voicerss."""
"""Load TTS from VoiceRSS."""
websession = async_get_clientsession(self.hass)
form_data = self._form_data.copy()
@ -137,11 +137,11 @@ class VoiceRSSProvider(Provider):
if data in ERROR_MSG:
_LOGGER.error(
"Error receive %s from voicerss.", str(data, 'utf-8'))
"Error receive %s from VoiceRSS", str(data, 'utf-8'))
return (None, None)
except (asyncio.TimeoutError, aiohttp.errors.ClientError):
_LOGGER.error("Timeout for voicerss api.")
_LOGGER.error("Timeout for VoiceRSS API")
return (None, None)
finally: