2023-04-13 21:25:38 +00:00
|
|
|
"""Constants for the Assist pipeline integration."""
|
2024-03-08 19:38:34 +00:00
|
|
|
|
2023-04-13 21:25:38 +00:00
|
|
|
DOMAIN = "assist_pipeline"
|
2023-08-30 03:07:27 +00:00
|
|
|
|
|
|
|
DATA_CONFIG = f"{DOMAIN}.config"
|
2024-04-08 15:29:55 +00:00
|
|
|
DATA_MIGRATIONS = f"{DOMAIN}_migrations"
|
2023-10-06 07:18:35 +00:00
|
|
|
|
|
|
|
DEFAULT_PIPELINE_TIMEOUT = 60 * 5 # seconds
|
|
|
|
|
|
|
|
DEFAULT_WAKE_WORD_TIMEOUT = 3 # seconds
|
|
|
|
|
|
|
|
CONF_DEBUG_RECORDING_DIR = "debug_recording_dir"
|
|
|
|
|
|
|
|
DATA_LAST_WAKE_UP = f"{DOMAIN}.last_wake_up"
|
2024-02-27 01:35:19 +00:00
|
|
|
WAKE_WORD_COOLDOWN = 2 # seconds
|
2023-11-16 16:28:06 +00:00
|
|
|
|
|
|
|
EVENT_RECORDING = f"{DOMAIN}_recording"
|
2024-07-31 07:42:45 +00:00
|
|
|
|
|
|
|
SAMPLE_RATE = 16000 # hertz
|
|
|
|
SAMPLE_WIDTH = 2 # bytes
|
|
|
|
SAMPLE_CHANNELS = 1 # mono
|
2024-08-01 20:39:17 +00:00
|
|
|
MS_PER_CHUNK = 10
|
|
|
|
SAMPLES_PER_CHUNK = SAMPLE_RATE // (1000 // MS_PER_CHUNK) # 10 ms @ 16Khz
|
|
|
|
BYTES_PER_CHUNK = SAMPLES_PER_CHUNK * SAMPLE_WIDTH * SAMPLE_CHANNELS # 16-bit
|
2024-09-06 01:16:30 +00:00
|
|
|
|
|
|
|
OPTION_PREFERRED = "preferred"
|