ESPHome: Pass through wake_word_phrase from on-device microWakeWord (#111585)

* ESPHome: Pass through wake_word_phrase from on-device microWakeWord

* Bump aioesphomeapi to 23.0.0
This commit is contained in:
Jesse Hills 2024-02-27 17:29:03 +13:00 committed by GitHub
parent 80ad4f1232
commit e1dade69e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 3 deletions

View file

@ -331,6 +331,7 @@ class ESPHomeManager:
conversation_id: str,
flags: int,
audio_settings: VoiceAssistantAudioSettings,
wake_word_phrase: str | None,
) -> int | None:
"""Start a voice assistant pipeline."""
if self.voice_assistant_udp_server is not None:
@ -354,6 +355,7 @@ class ESPHomeManager:
conversation_id=conversation_id or None,
flags=flags,
audio_settings=audio_settings,
wake_word_phrase=wake_word_phrase,
),
"esphome.voice_assistant_udp_server.run_pipeline",
)

View file

@ -16,7 +16,7 @@
"iot_class": "local_push",
"loggers": ["aioesphomeapi", "noiseprotocol", "bleak_esphome"],
"requirements": [
"aioesphomeapi==22.1.0",
"aioesphomeapi==23.0.0",
"esphome-dashboard-api==1.2.3",
"bleak-esphome==1.0.0"
],

View file

@ -237,6 +237,7 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
conversation_id: str | None,
flags: int = 0,
audio_settings: VoiceAssistantAudioSettings | None = None,
wake_word_phrase: str | None = None,
) -> None:
"""Run the Voice Assistant pipeline."""
if audio_settings is None or audio_settings.volume_multiplier == 0:
@ -273,6 +274,7 @@ class VoiceAssistantUDPServer(asyncio.DatagramProtocol):
tts_audio_output=tts_audio_output,
start_stage=start_stage,
wake_word_settings=WakeWordSettings(timeout=5),
wake_word_phrase=wake_word_phrase,
audio_settings=AudioSettings(
noise_suppression_level=audio_settings.noise_suppression_level,
auto_gain_dbfs=audio_settings.auto_gain,

View file

@ -245,7 +245,7 @@ aioelectricitymaps==0.4.0
aioemonitor==1.0.5
# homeassistant.components.esphome
aioesphomeapi==22.1.0
aioesphomeapi==23.0.0
# homeassistant.components.flo
aioflo==2021.11.0

View file

@ -224,7 +224,7 @@ aioelectricitymaps==0.4.0
aioemonitor==1.0.5
# homeassistant.components.esphome
aioesphomeapi==22.1.0
aioesphomeapi==23.0.0
# homeassistant.components.flo
aioflo==2021.11.0