From eec67d8b1a3b25276a1dc0b2eb3449571ae71284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D1=83=D0=B1=D0=BE=D0=B2=D0=B8=D0=BA=20=D0=9C=D0=B0?= =?UTF-8?q?=D0=BA=D1=81=D0=B8=D0=BC?= Date: Wed, 3 Jul 2019 17:40:14 +0300 Subject: [PATCH] New languages that looks like supported by Google but not documented: (#24881) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cs-CZ – Czech, Czech Republic * el-GR – Modern Greek (1453-), Greece * en-IN – English, India * fi-FI – Finnish, Finland * fil-PH – Filipino, Philippines * hi-IN – Hindi, India * id-ID – Indonesian, Indonesia * vi-VN – Vietnamese, Viet Nam Fixed regex expression to match language codes like fil-PH --- homeassistant/components/google_cloud/tts.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/google_cloud/tts.py b/homeassistant/components/google_cloud/tts.py index c9004b78dbe..696d4da3223 100644 --- a/homeassistant/components/google_cloud/tts.py +++ b/homeassistant/components/google_cloud/tts.py @@ -22,15 +22,16 @@ CONF_GAIN = 'gain' CONF_PROFILES = 'profiles' SUPPORTED_LANGUAGES = [ - 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-US', 'es-ES', 'fr-CA', 'fr-FR', - 'hu-HU', 'it-IT', 'ja-JP', 'ko-KR', 'nb-NO', 'nl-NL', 'pl-PL', 'pt-BR', - 'pt-PT', 'ru-RU', 'sk-SK', 'sv-SE', 'tr-TR', 'uk-UA', + 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-IN', 'en-US', + 'es-ES', 'fi-FI', 'fil-PH', 'fr-CA', 'fr-FR', 'hi-IN', 'hu-HU', 'id-ID', + 'it-IT', 'ja-JP', 'ko-KR', 'nb-NO', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', + 'ru-RU', 'sk-SK', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN', ] DEFAULT_LANG = 'en-US' DEFAULT_GENDER = 'NEUTRAL' -VOICE_REGEX = r'[a-z]{2}-[A-Z]{2}-(Standard|Wavenet)-[A-Z]|' +VOICE_REGEX = r'[a-z]{2,3}-[A-Z]{2}-(Standard|Wavenet)-[A-Z]|' DEFAULT_VOICE = '' DEFAULT_ENCODING = 'MP3'