mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Move imports to top for microsoft (#29395)
This commit is contained in:
parent
518ca3afa7
commit
048068307d
@ -2,6 +2,7 @@
|
|||||||
from http.client import HTTPException
|
from http.client import HTTPException
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from pycsspeechtts import pycsspeechtts
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider
|
from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider
|
||||||
@ -142,7 +143,6 @@ class MicrosoftProvider(Provider):
|
|||||||
"""Load TTS from Microsoft."""
|
"""Load TTS from Microsoft."""
|
||||||
if language is None:
|
if language is None:
|
||||||
language = self._lang
|
language = self._lang
|
||||||
from pycsspeechtts import pycsspeechtts
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
trans = pycsspeechtts.TTSTranslator(self._apikey, self._region)
|
trans = pycsspeechtts.TTSTranslator(self._apikey, self._region)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user