Implements Microsoft Cognitive Services TTS provider for Home Assistant, handling speech synthesis.
# Source: https://github.com/home-assistant/core | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Support for the Microsoft Cognitive Services text-to-speech service."""
import logging
from typing import Any, override
import probatio
from pycsspeechtts import pycsspeechtts
from requests.exceptions import HTTPError
from homeassistant.components.tts import (
CONF_LANG,
PLATFORM_SCHEMA as TTS_PLATFORM_SCHEMA,
Provider,
TtsAudioType,
)
from homeassistant.const import CONF_API_KEY, CONF_REGION, CONF_TYPE, PERCENTAGE
from homeassistant.generated.microsoft_tts import SUPPORTED_LANGUAGES
from homeassistant.helpers import config_validation as cv
CONF_GENDER = "gender"
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key