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

Classes

class  WatsonTTSProvider
 

Functions

def get_engine (hass, config, discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_APIKEY = "watson_apikey"
 
string CONF_OUTPUT_FORMAT = "output_format"
 
string CONF_TEXT_TYPE = "text"
 
string CONF_URL = "watson_url"
 
string CONF_VOICE = "voice"
 
dictionary CONTENT_TYPE_EXTENSIONS
 
string DEFAULT_OUTPUT_FORMAT = "audio/mp3"
 
string DEFAULT_URL = "https://api.us-south.text-to-speech.watson.cloud.ibm.com"
 
string DEFAULT_VOICE = "en-US_AllisonV3Voice"
 
list DEPRECATED_VOICES
 
 PLATFORM_SCHEMA
 
list SUPPORTED_OUTPUT_FORMATS
 
list SUPPORTED_VOICES
 

Detailed Description

Support for IBM Watson TTS integration.

Function Documentation

◆ get_engine()

def homeassistant.components.watson_tts.tts.get_engine (   hass,
  config,
  discovery_info = None 
)
Set up IBM Watson TTS component.

Definition at line 132 of file tts.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 15 of file tts.py.

◆ CONF_APIKEY

string homeassistant.components.watson_tts.tts.CONF_APIKEY = "watson_apikey"

Definition at line 18 of file tts.py.

◆ CONF_OUTPUT_FORMAT

string homeassistant.components.watson_tts.tts.CONF_OUTPUT_FORMAT = "output_format"

Definition at line 23 of file tts.py.

◆ CONF_TEXT_TYPE

string homeassistant.components.watson_tts.tts.CONF_TEXT_TYPE = "text"

Definition at line 24 of file tts.py.

◆ CONF_URL

string homeassistant.components.watson_tts.tts.CONF_URL = "watson_url"

Definition at line 17 of file tts.py.

◆ CONF_VOICE

string homeassistant.components.watson_tts.tts.CONF_VOICE = "voice"

Definition at line 22 of file tts.py.

◆ CONTENT_TYPE_EXTENSIONS

dictionary homeassistant.components.watson_tts.tts.CONTENT_TYPE_EXTENSIONS
Initial value:
1 = {
2  "audio/flac": "flac",
3  "audio/mp3": "mp3",
4  "audio/mpeg": "mp3",
5  "audio/ogg": "ogg",
6  "audio/ogg;codecs=opus": "ogg",
7  "audio/ogg;codecs=vorbis": "ogg",
8  "audio/wav": "wav",
9 }

Definition at line 107 of file tts.py.

◆ DEFAULT_OUTPUT_FORMAT

string homeassistant.components.watson_tts.tts.DEFAULT_OUTPUT_FORMAT = "audio/mp3"

Definition at line 118 of file tts.py.

◆ DEFAULT_URL

string homeassistant.components.watson_tts.tts.DEFAULT_URL = "https://api.us-south.text-to-speech.watson.cloud.ibm.com"

Definition at line 20 of file tts.py.

◆ DEFAULT_VOICE

string homeassistant.components.watson_tts.tts.DEFAULT_VOICE = "en-US_AllisonV3Voice"

Definition at line 117 of file tts.py.

◆ DEPRECATED_VOICES

list homeassistant.components.watson_tts.tts.DEPRECATED_VOICES
Initial value:
1 = [
2  "de-DE_BirgitVoice",
3  "de-DE_DieterVoice",
4  "en-US_AllisonVoice",
5  "en-US_LisaVoice",
6  "en-US_MichaelVoice",
7  "es-ES_EnriqueVoice",
8  "es-ES_LauraVoice",
9  "es-LA_SofiaVoice",
10  "es-US_SofiaVoice",
11  "fr-FR_ReneeVoice",
12  "it-IT_FrancescaVoice",
13  "ja-JP_EmiVoice",
14  "pt-BR_IsabelaVoice",
15 ]

Definition at line 81 of file tts.py.

◆ PLATFORM_SCHEMA

homeassistant.components.watson_tts.tts.PLATFORM_SCHEMA
Initial value:
1 = TTS_PLATFORM_SCHEMA.extend(
2  {
3  vol.Optional(CONF_URL, default=DEFAULT_URL): cv.string,
4  vol.Required(CONF_APIKEY): cv.string,
5  vol.Optional(CONF_VOICE, default=DEFAULT_VOICE): vol.In(SUPPORTED_VOICES),
6  vol.Optional(CONF_OUTPUT_FORMAT, default=DEFAULT_OUTPUT_FORMAT): vol.In(
7  SUPPORTED_OUTPUT_FORMATS
8  ),
9  }
10 )

Definition at line 120 of file tts.py.

◆ SUPPORTED_OUTPUT_FORMATS

list homeassistant.components.watson_tts.tts.SUPPORTED_OUTPUT_FORMATS
Initial value:
1 = [
2  "audio/flac",
3  "audio/mp3",
4  "audio/mpeg",
5  "audio/ogg",
6  "audio/ogg;codecs=opus",
7  "audio/ogg;codecs=vorbis",
8  "audio/wav",
9 ]

Definition at line 97 of file tts.py.

◆ SUPPORTED_VOICES

list homeassistant.components.watson_tts.tts.SUPPORTED_VOICES

Definition at line 27 of file tts.py.