From bd8b63a357bb374f5875f0fedf2d677589419810 Mon Sep 17 00:00:00 2001 From: yum Date: Tue, 22 Nov 2022 15:36:19 -0800 Subject: Rework input controls Press joystick once to start recording, again to stop. When you start recording, any previous text on the board is cleared. Add 2 visual indicators: one to indicate speech, another to indicate that audio is paging. --- string_matcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string_matcher.py') diff --git a/string_matcher.py b/string_matcher.py index 543b18f..461f180 100644 --- a/string_matcher.py +++ b/string_matcher.py @@ -78,7 +78,7 @@ def matchStrings(old_text: str, new_text: str, window_size = 3) -> str: for j in range(0, 1 + len(new_text) - window_size): new_slice = new_text[j:j + window_size] cur_d = editdistance.eval(old_slice, new_slice) - if cur_d <= best_match_d: + if cur_d < best_match_d: best_match_i = i best_match_j = j best_match_d = cur_d -- cgit v1.2.3