aboutsummaryrefslogtreecommitdiffstats
path: root/deckit/modules
diff options
context:
space:
mode:
Diffstat (limited to 'deckit/modules')
-rw-r--r--deckit/modules/assistant.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/deckit/modules/assistant.py b/deckit/modules/assistant.py
index f0b3947..4355cfa 100644
--- a/deckit/modules/assistant.py
+++ b/deckit/modules/assistant.py
@@ -127,6 +127,9 @@ def qarma_args(item, kinds):
def make(cfg: dict) -> Module:
shell = os.path.expanduser(cfg.get("assistant", {}).get("shell", ""))
+ face = cfg.get("assistant", {}).get("face") or None
+ if not (isinstance(face, list) and len(face) == 3 and all(isinstance(v, (int, float)) for v in face)):
+ face = None # [centre x, centre y, size] in the background image, else a plain circle
lock = threading.Lock() # guards st
send_lock = threading.Lock() # one writer on the socket at a time
voice_lock = threading.Lock()
@@ -201,6 +204,7 @@ def make(cfg: dict) -> Module:
out = json.loads(json.dumps(st)) # a copy: the reader keeps writing
out["wanted"] = wanted()
out["hears"] = hears(st["models"], out["wanted"])
+ out["face"] = face
return out
def model(body):