Improve attention, voice direction, reach, pick and follow from live feedback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 20:22:32 +09:00
co-authored by Claude Opus 5.5
parent 2e8dc226ff
commit e3fa2d95b3
92 changed files with 2183 additions and 307 deletions
+7
View File
@@ -66,6 +66,13 @@ last_echo = None # echo() of the last own_voice() c
last_voice = 0.0 # time.time() when the last say_stream() began to play (lumi.py logs it)
def saying(since):
"""What Lumi has been saying from `since` (time.time()) on: the sentence playing then and those after it."""
texts = [t for when, t in _recent if when > since]
before = [t for when, t in _recent if since - 20.0 < when <= since] # a long sentence takes 15 s and more
return " ".join(before[-1:] + texts)
def recent_speech(seconds=30.0):
"""What Lumi said in the last seconds (lumi.py ignores its own voice picked up by the clip mic).
Long sentences take 15 s and more to say, so the window is long."""