* Add wake component * Add wake support to Wyoming * Add helper function to assist_pipeline (not complete) * Rename wake to wake_word * Fix platform * Use send_event and clean up * Merge wake word into pipeline * Add wake option to async_pipeline_from_audio_stream * Add start/end stages to async_pipeline_from_audio_stream * Add wake timeout * Remove layer in wake_output * Use VAD for wake word timeout * Include audio metadata in wake-start * Remove unnecessary websocket command * wake -> wake_word * Incorporate feedback * Clean up wake_word tests * Add wyoming wake word tests * Add pipeline wake word test * Add last processed state * Fix tests * Add tests for wake word * More tests for the codebot
24 lines
497 B
Python
24 lines
497 B
Python
"""Wake word models."""
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class WakeWord:
|
|
"""Wake word model."""
|
|
|
|
ww_id: str
|
|
name: str
|
|
|
|
|
|
@dataclass
|
|
class DetectionResult:
|
|
"""Result of wake word detection."""
|
|
|
|
ww_id: str
|
|
"""Id of detected wake word"""
|
|
|
|
timestamp: int | None
|
|
"""Timestamp of audio chunk with detected wake word"""
|
|
|
|
queued_audio: list[tuple[bytes, int]] | None = None
|
|
"""Audio chunks that were queued when wake word was detected."""
|