Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.microsoft.tts Namespace Reference

Classes

class  MicrosoftProvider
 

Functions

def get_engine (hass, config, discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_CONTOUR = "contour"
 
string CONF_GENDER = "gender"
 
string CONF_OUTPUT = "output"
 
string CONF_PITCH = "pitch"
 
string CONF_RATE = "rate"
 
string CONF_VOLUME = "volume"
 
string DEFAULT_CONTOUR = ""
 
string DEFAULT_GENDER = "Female"
 
string DEFAULT_LANG = "en-us"
 
string DEFAULT_OUTPUT = "audio-24khz-96kbitrate-mono-mp3"
 
string DEFAULT_PITCH = "default"
 
int DEFAULT_RATE = 0
 
string DEFAULT_REGION = "eastus"
 
string DEFAULT_TYPE = "JennyNeural"
 
int DEFAULT_VOLUME = 0
 
list GENDERS = ["Female", "Male"]
 
 PLATFORM_SCHEMA
 

Detailed Description

Support for the Microsoft Cognitive Services text-to-speech service.

Function Documentation

◆ get_engine()

def homeassistant.components.microsoft.tts.get_engine (   hass,
  config,
  discovery_info = None 
)
Set up Microsoft speech component.

Definition at line 57 of file tts.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.microsoft.tts._LOGGER = logging.getLogger(__name__)
private

Definition at line 24 of file tts.py.

◆ CONF_CONTOUR

string homeassistant.components.microsoft.tts.CONF_CONTOUR = "contour"

Definition at line 23 of file tts.py.

◆ CONF_GENDER

string homeassistant.components.microsoft.tts.CONF_GENDER = "gender"

Definition at line 18 of file tts.py.

◆ CONF_OUTPUT

string homeassistant.components.microsoft.tts.CONF_OUTPUT = "output"

Definition at line 19 of file tts.py.

◆ CONF_PITCH

string homeassistant.components.microsoft.tts.CONF_PITCH = "pitch"

Definition at line 22 of file tts.py.

◆ CONF_RATE

string homeassistant.components.microsoft.tts.CONF_RATE = "rate"

Definition at line 20 of file tts.py.

◆ CONF_VOLUME

string homeassistant.components.microsoft.tts.CONF_VOLUME = "volume"

Definition at line 21 of file tts.py.

◆ DEFAULT_CONTOUR

string homeassistant.components.microsoft.tts.DEFAULT_CONTOUR = ""

Definition at line 35 of file tts.py.

◆ DEFAULT_GENDER

string homeassistant.components.microsoft.tts.DEFAULT_GENDER = "Female"

Definition at line 29 of file tts.py.

◆ DEFAULT_LANG

string homeassistant.components.microsoft.tts.DEFAULT_LANG = "en-us"

Definition at line 28 of file tts.py.

◆ DEFAULT_OUTPUT

string homeassistant.components.microsoft.tts.DEFAULT_OUTPUT = "audio-24khz-96kbitrate-mono-mp3"

Definition at line 31 of file tts.py.

◆ DEFAULT_PITCH

string homeassistant.components.microsoft.tts.DEFAULT_PITCH = "default"

Definition at line 34 of file tts.py.

◆ DEFAULT_RATE

int homeassistant.components.microsoft.tts.DEFAULT_RATE = 0

Definition at line 32 of file tts.py.

◆ DEFAULT_REGION

string homeassistant.components.microsoft.tts.DEFAULT_REGION = "eastus"

Definition at line 36 of file tts.py.

◆ DEFAULT_TYPE

string homeassistant.components.microsoft.tts.DEFAULT_TYPE = "JennyNeural"

Definition at line 30 of file tts.py.

◆ DEFAULT_VOLUME

int homeassistant.components.microsoft.tts.DEFAULT_VOLUME = 0

Definition at line 33 of file tts.py.

◆ GENDERS

list homeassistant.components.microsoft.tts.GENDERS = ["Female", "Male"]

Definition at line 26 of file tts.py.

◆ PLATFORM_SCHEMA

homeassistant.components.microsoft.tts.PLATFORM_SCHEMA
Initial value:
1 = TTS_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_API_KEY): cv.string,
4  vol.Optional(CONF_LANG, default=DEFAULT_LANG): vol.In(SUPPORTED_LANGUAGES),
5  vol.Optional(CONF_GENDER, default=DEFAULT_GENDER): vol.In(GENDERS),
6  vol.Optional(CONF_TYPE, default=DEFAULT_TYPE): cv.string,
7  vol.Optional(CONF_RATE, default=DEFAULT_RATE): vol.All(
8  vol.Coerce(int), vol.Range(-100, 100)
9  ),
10  vol.Optional(CONF_VOLUME, default=DEFAULT_VOLUME): vol.All(
11  vol.Coerce(int), vol.Range(-100, 100)
12  ),
13  vol.Optional(CONF_PITCH, default=DEFAULT_PITCH): cv.string,
14  vol.Optional(CONF_CONTOUR, default=DEFAULT_CONTOUR): cv.string,
15  vol.Optional(CONF_REGION, default=DEFAULT_REGION): cv.string,
16  }
17 )

Definition at line 38 of file tts.py.