Small Assist Satellite fixes (#125384)
parent
dfcfe78732
commit
ff3cabbf3a
|
@ -504,7 +504,7 @@ class AudioSettings:
|
|||
is_vad_enabled: bool = True
|
||||
"""True if VAD is used to determine the end of the voice command."""
|
||||
|
||||
silence_seconds: float = 0.5
|
||||
silence_seconds: float = 0.7
|
||||
"""Seconds of silence after voice command has ended."""
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
|
@ -906,6 +906,8 @@ class PipelineRun:
|
|||
metadata,
|
||||
self._speech_to_text_stream(audio_stream=stream, stt_vad=stt_vad),
|
||||
)
|
||||
except (asyncio.CancelledError, TimeoutError):
|
||||
raise # expected
|
||||
except Exception as src_error:
|
||||
_LOGGER.exception("Unexpected error during speech-to-text")
|
||||
raise SpeechToTextError(
|
||||
|
|
|
@ -73,7 +73,7 @@ class AssistSatelliteEntity(entity.Entity):
|
|||
_is_announcing = False
|
||||
_wake_word_intercept_future: asyncio.Future[str | None] | None = None
|
||||
|
||||
__assist_satellite_state: AssistSatelliteState | None = None
|
||||
__assist_satellite_state = AssistSatelliteState.LISTENING_WAKE_WORD
|
||||
|
||||
@final
|
||||
@property
|
||||
|
|
|
@ -21,7 +21,6 @@ from homeassistant.components.assist_satellite import SatelliteBusyError
|
|||
from homeassistant.components.assist_satellite.entity import AssistSatelliteState
|
||||
from homeassistant.components.media_source import PlayMedia
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import STATE_UNKNOWN
|
||||
from homeassistant.core import Context, HomeAssistant
|
||||
|
||||
from . import ENTITY_ID
|
||||
|
@ -35,7 +34,7 @@ async def test_entity_state(
|
|||
|
||||
state = hass.states.get(ENTITY_ID)
|
||||
assert state is not None
|
||||
assert state.state == STATE_UNKNOWN
|
||||
assert state.state == AssistSatelliteState.LISTENING_WAKE_WORD
|
||||
|
||||
context = Context()
|
||||
audio_stream = object()
|
||||
|
@ -71,7 +70,7 @@ async def test_entity_state(
|
|||
assert kwargs["end_stage"] == PipelineStage.TTS
|
||||
|
||||
for event_type, expected_state in (
|
||||
(PipelineEventType.RUN_START, STATE_UNKNOWN),
|
||||
(PipelineEventType.RUN_START, AssistSatelliteState.LISTENING_WAKE_WORD),
|
||||
(PipelineEventType.RUN_END, AssistSatelliteState.LISTENING_WAKE_WORD),
|
||||
(PipelineEventType.WAKE_WORD_START, AssistSatelliteState.LISTENING_WAKE_WORD),
|
||||
(PipelineEventType.WAKE_WORD_END, AssistSatelliteState.LISTENING_WAKE_WORD),
|
||||
|
|
Loading…
Reference in New Issue