mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 07:17:12 +00:00
Fix link (#5343)
This commit is contained in:
parent
e00e6f9db6
commit
2465aea63b
@ -2,7 +2,7 @@
|
|||||||
Support for the google speech service.
|
Support for the google speech service.
|
||||||
|
|
||||||
For more details about this component, please refer to the documentation at
|
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 asyncio
|
||||||
import logging
|
import logging
|
||||||
@ -46,7 +46,7 @@ def async_get_engine(hass, config):
|
|||||||
|
|
||||||
|
|
||||||
class GoogleProvider(Provider):
|
class GoogleProvider(Provider):
|
||||||
"""Google speech api provider."""
|
"""The Google speech API provider."""
|
||||||
|
|
||||||
def __init__(self, hass, lang):
|
def __init__(self, hass, lang):
|
||||||
"""Init Google TTS service."""
|
"""Init Google TTS service."""
|
||||||
|
@ -25,7 +25,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
|
|
||||||
|
|
||||||
def get_engine(hass, config):
|
def get_engine(hass, config):
|
||||||
"""Setup pico speech component."""
|
"""Set up Pico speech component."""
|
||||||
if shutil.which("pico2wave") is None:
|
if shutil.which("pico2wave") is None:
|
||||||
_LOGGER.error("'pico2wave' was not found")
|
_LOGGER.error("'pico2wave' was not found")
|
||||||
return False
|
return False
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Support for the voicerss speech service.
|
Support for the voicerss speech service.
|
||||||
|
|
||||||
For more details about this component, please refer to the documentation at
|
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 asyncio
|
||||||
import logging
|
import logging
|
||||||
@ -83,12 +83,12 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def async_get_engine(hass, config):
|
def async_get_engine(hass, config):
|
||||||
"""Setup VoiceRSS speech component."""
|
"""Set up VoiceRSS TTS component."""
|
||||||
return VoiceRSSProvider(hass, config)
|
return VoiceRSSProvider(hass, config)
|
||||||
|
|
||||||
|
|
||||||
class VoiceRSSProvider(Provider):
|
class VoiceRSSProvider(Provider):
|
||||||
"""VoiceRSS speech api provider."""
|
"""The VoiceRSS speech API provider."""
|
||||||
|
|
||||||
def __init__(self, hass, conf):
|
def __init__(self, hass, conf):
|
||||||
"""Init VoiceRSS TTS service."""
|
"""Init VoiceRSS TTS service."""
|
||||||
@ -115,7 +115,7 @@ class VoiceRSSProvider(Provider):
|
|||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def async_get_tts_audio(self, message, language):
|
def async_get_tts_audio(self, message, language):
|
||||||
"""Load TTS from voicerss."""
|
"""Load TTS from VoiceRSS."""
|
||||||
websession = async_get_clientsession(self.hass)
|
websession = async_get_clientsession(self.hass)
|
||||||
form_data = self._form_data.copy()
|
form_data = self._form_data.copy()
|
||||||
|
|
||||||
@ -137,11 +137,11 @@ class VoiceRSSProvider(Provider):
|
|||||||
|
|
||||||
if data in ERROR_MSG:
|
if data in ERROR_MSG:
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
"Error receive %s from voicerss.", str(data, 'utf-8'))
|
"Error receive %s from VoiceRSS", str(data, 'utf-8'))
|
||||||
return (None, None)
|
return (None, None)
|
||||||
|
|
||||||
except (asyncio.TimeoutError, aiohttp.errors.ClientError):
|
except (asyncio.TimeoutError, aiohttp.errors.ClientError):
|
||||||
_LOGGER.error("Timeout for voicerss api.")
|
_LOGGER.error("Timeout for VoiceRSS API")
|
||||||
return (None, None)
|
return (None, None)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user