Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.stt Namespace Reference

Namespaces

 const
 
 legacy
 
 models
 

Classes

class  SpeechToTextEntity
 
class  SpeechToTextView
 

Functions

SpeechMetadata _metadata_from_header (web.Request request)
 
str|None async_default_engine (HomeAssistant hass)
 
SpeechToTextEntity|Provider|None async_get_speech_to_text_engine (HomeAssistant hass, str engine_id)
 
SpeechToTextEntity|None async_get_speech_to_text_entity (HomeAssistant hass, str entity_id)
 
set[str] async_get_speech_to_text_languages (HomeAssistant hass)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 
None websocket_list_engines (HomeAssistant hass, websocket_api.ActiveConnection connection, dict msg)
 

Variables

list __all__
 
 _LOGGER = logging.getLogger(__name__)
 
 CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
 

Detailed Description

Provide functionality to STT.

Function Documentation

◆ _metadata_from_header()

SpeechMetadata homeassistant.components.stt._metadata_from_header ( web.Request  request)
private
Extract STT metadata from header.

X-Speech-Content:
    format=wav; codec=pcm; sample_rate=16000; bit_rate=16; channel=1; language=de_de

Definition at line 365 of file __init__.py.

◆ async_default_engine()

str | None homeassistant.components.stt.async_default_engine ( HomeAssistant  hass)
Return the domain or entity id of the default engine.

Definition at line 74 of file __init__.py.

◆ async_get_speech_to_text_engine()

SpeechToTextEntity | Provider | None homeassistant.components.stt.async_get_speech_to_text_engine ( HomeAssistant  hass,
str   engine_id 
)
Return stt entity or legacy provider.

Definition at line 97 of file __init__.py.

◆ async_get_speech_to_text_entity()

SpeechToTextEntity | None homeassistant.components.stt.async_get_speech_to_text_entity ( HomeAssistant  hass,
str   entity_id 
)
Return stt entity.

Definition at line 89 of file __init__.py.

◆ async_get_speech_to_text_languages()

set[str] homeassistant.components.stt.async_get_speech_to_text_languages ( HomeAssistant  hass)
Return a set with the union of languages supported by stt engines.

Definition at line 107 of file __init__.py.

◆ async_setup()

bool homeassistant.components.stt.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up STT.

Definition at line 122 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.stt.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up a config entry.

Definition at line 146 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.stt.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a config entry.

Definition at line 151 of file __init__.py.

◆ websocket_list_engines()

None homeassistant.components.stt.websocket_list_engines ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict   msg 
)
List speech-to-text engines and, optionally, if they support a given language.

Definition at line 418 of file __init__.py.

Variable Documentation

◆ __all__

list homeassistant.components.stt.__all__
private
Initial value:
1 = [
2  "async_get_provider",
3  "async_get_speech_to_text_engine",
4  "async_get_speech_to_text_entity",
5  "AudioBitRates",
6  "AudioChannels",
7  "AudioCodecs",
8  "AudioFormats",
9  "AudioSampleRates",
10  "DOMAIN",
11  "Provider",
12  "SpeechToTextEntity",
13  "SpeechMetadata",
14  "SpeechResult",
15  "SpeechResultState",
16 ]

Definition at line 51 of file __init__.py.

◆ _LOGGER

homeassistant.components.stt._LOGGER = logging.getLogger(__name__)
private

Definition at line 68 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.stt.CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)

Definition at line 70 of file __init__.py.