From e13cc31e5bbba24d5c41a203cf58ce677dd489d3 Mon Sep 17 00:00:00 2001 From: imonlinux <39863321+imonlinux@users.noreply.github.com> Date: Mon, 24 Nov 2025 15:14:15 -0800 Subject: [PATCH] Update satellite.py Fix bug with no stt after wake word detection. --- linux_voice_assistant/satellite.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/linux_voice_assistant/satellite.py b/linux_voice_assistant/satellite.py index ba36aa1..1f0d28a 100644 --- a/linux_voice_assistant/satellite.py +++ b/linux_voice_assistant/satellite.py @@ -190,7 +190,26 @@ class VoiceSatelliteProtocol(APIServer): self._determine_final_state() elif event_type == VoiceAssistantEventType.VOICE_ASSISTANT_ERROR: + code = data.get("code") + message = data.get("message") + _LOGGER.debug( + "VoiceAssistant error received: code=%s, message=%s", code, message + ) + + # Treat "no text recognized" as a benign outcome, not a hard error. + if code == "stt-no-text-recognized": + _LOGGER.debug( + "No text recognized from STT; treating as benign and returning to IDLE." + ) + # Ensure we stop streaming audio for this run + self._is_streaming_audio = False + # Go directly back to IDLE (unduck, idle LEDs, etc.) + self._set_state(SatelliteState.IDLE) + return + + # All other errors follow the normal error path. self._set_state(SatelliteState.ERROR) + # After a brief period, return to IDLE automatically. self.state.loop.call_later(5.0, self._set_state, SatelliteState.IDLE) def handle_timer_event(