Paritosh Upadhyay commited on
Commit ·
1793515
1
Parent(s): 2d63d9b
Sensory Restoration: Fixed logical deafness & auditory alignment
Browse files
backend/app/services/wake_word.py
CHANGED
|
@@ -153,9 +153,16 @@ def _listen_loop(chunk_size: int):
|
|
| 153 |
|
| 154 |
# Only process if we have a full frame (prevent segfaults in ONNX)
|
| 155 |
if len(audio_frame) == chunk_size:
|
| 156 |
-
# [SOVEREIGN PRIVACY]: Stop listening if core power is OFF (Locked)
|
| 157 |
from app.services import state
|
| 158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
continue
|
| 160 |
|
| 161 |
# Log audio level occasionally for diagnostic
|
|
|
|
| 153 |
|
| 154 |
# Only process if we have a full frame (prevent segfaults in ONNX)
|
| 155 |
if len(audio_frame) == chunk_size:
|
| 156 |
+
# [SOVEREIGN PRIVACY]: Stop listening if core power is OFF (Locked/Standby)
|
| 157 |
from app.services import state
|
| 158 |
+
is_locked = state.is_sovereign_locked()
|
| 159 |
+
|
| 160 |
+
# Handle potential string values from the DB/Memory
|
| 161 |
+
if isinstance(is_locked, str): is_locked = is_locked.lower() == "true"
|
| 162 |
+
|
| 163 |
+
if is_locked:
|
| 164 |
+
if time.time() % 30 < 0.1:
|
| 165 |
+
logger.info("👂 Acoustic Sentinel: Ears muted (Sovereign Standby)")
|
| 166 |
continue
|
| 167 |
|
| 168 |
# Log audio level occasionally for diagnostic
|