Commit ·
02197ff
1
Parent(s): a6cdaca
Fix: Disable tap detection IMMEDIATELY in wakeup() and wakeup_from_tap() to prevent false triggers
Browse files
reachy_mini_ha_voice/satellite.py
CHANGED
|
@@ -381,6 +381,11 @@ class VoiceSatelliteProtocol(APIServer):
|
|
| 381 |
# Mark pipeline as active IMMEDIATELY to prevent duplicate wakeups
|
| 382 |
# This is set before sending request to HA, as there's network delay
|
| 383 |
self._pipeline_active = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 384 |
|
| 385 |
wake_word_phrase = wake_word.wake_word
|
| 386 |
_LOGGER.debug("Detected wake word: %s", wake_word_phrase)
|
|
@@ -437,6 +442,13 @@ class VoiceSatelliteProtocol(APIServer):
|
|
| 437 |
|
| 438 |
_LOGGER.info("Tap detected - entering continuous conversation mode")
|
| 439 |
self._tap_conversation_mode = True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 440 |
|
| 441 |
# Get or create conversation_id for context tracking
|
| 442 |
conv_id = self._get_or_create_conversation_id()
|
|
|
|
| 381 |
# Mark pipeline as active IMMEDIATELY to prevent duplicate wakeups
|
| 382 |
# This is set before sending request to HA, as there's network delay
|
| 383 |
self._pipeline_active = True
|
| 384 |
+
|
| 385 |
+
# Disable tap detection IMMEDIATELY to prevent false triggers during conversation
|
| 386 |
+
tap_detector = getattr(self.state, 'tap_detector', None)
|
| 387 |
+
if tap_detector:
|
| 388 |
+
tap_detector.set_enabled(False)
|
| 389 |
|
| 390 |
wake_word_phrase = wake_word.wake_word
|
| 391 |
_LOGGER.debug("Detected wake word: %s", wake_word_phrase)
|
|
|
|
| 442 |
|
| 443 |
_LOGGER.info("Tap detected - entering continuous conversation mode")
|
| 444 |
self._tap_conversation_mode = True
|
| 445 |
+
self._pipeline_active = True
|
| 446 |
+
|
| 447 |
+
# Disable tap detection IMMEDIATELY - it will be re-enabled when conversation ends
|
| 448 |
+
# Note: This tap callback won't be called again until re-enabled
|
| 449 |
+
tap_detector = getattr(self.state, 'tap_detector', None)
|
| 450 |
+
if tap_detector:
|
| 451 |
+
tap_detector.set_enabled(False)
|
| 452 |
|
| 453 |
# Get or create conversation_id for context tracking
|
| 454 |
conv_id = self._get_or_create_conversation_id()
|