<commit_before>"""Support for the Google Cloud TTS service."""
import logging
import os

import asyncio
import async_timeout
import voluptuous as vol
from google.cloud import texttospeech

from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider
import homeassistant.helpers.config_validation as cv

_LOGGER = logging.getLogger(__name__)

CONF_KEY_FILE = 'key_file'
CONF_GENDER = 'gender'
CONF_VOICE = 'voice'
CONF_ENCODING = 'encoding'
CONF_SPEED = 'speed'
CONF_PITCH = 'pitch'
CONF_GAIN = 'gain'
CONF_PROFILES = 'profiles'

SUPPORTED_LANGUAGES = [
    'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-US', 'es-ES', 'fr-CA', 'fr-FR',
    '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',
]
DEFAULT_LANG = 'en-US'

DEFAULT_GENDER = 'NEUTRAL'

VOICE_REGEX = r'[a-z]{2}-[A-Z]{2}-(Standard|Wavenet)-[A-Z]|'
DEFAULT_VOICE = ''

DEFAULT_ENCODING = 'MP3'
<commit_msg>Hungarian is also supported in Google Cloud TTS  (#24861)<commit_after>"""Support for the Google Cloud TTS service."""
import logging
import os

import asyncio
import async_timeout
import voluptuous as vol
from google.cloud import texttospeech

from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider
import homeassistant.helpers.config_validation as cv

_LOGGER = logging.getLogger(__name__)

CONF_KEY_FILE = 'key_file'
CONF_GENDER = 'gender'
CONF_VOICE = 'voice'
CONF_ENCODING = 'encoding'
CONF_SPEED = 'speed'
CONF_PITCH = 'pitch'
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',
]
DEFAULT_LANG = 'en-US'

DEFAULT_GENDER = 'NEUTRAL'

VOICE_REGEX = r'[a-z]{2}-[A-Z]{2}-(Standard|Wavenet)-[A-Z]|'
DEFAULT_VOICE = ''

DEFAULT_ENCODING = 'MP3'

{'fraction_non_alphanumeric': 0.17671303451828954, 'fraction_numerical': 0.005667181865018032, 'mean_word_length': 5.031055900621118, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5097856', 'n_tokens_mistral': 822, 'n_tokens_neox': 796, 'n_words': 173}