From 113f2858016c252b97cac96eab454ee16b2dcda2 Mon Sep 17 00:00:00 2001 From: yum Date: Thu, 27 Oct 2022 19:15:48 -0700 Subject: Tweak continuous transcription Stitching new uses 6 word sliding window instead of 4 word. Seems to dramatically improve transcription quality. --- string_matcher.py | 2 +- transcribe.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/string_matcher.py b/string_matcher.py index 458244b..17bfaac 100644 --- a/string_matcher.py +++ b/string_matcher.py @@ -8,7 +8,7 @@ import typing # Find the window where the distance between these two transcriptions is # minimized and use it to stitch them together. def matchStringList(old_words: typing.List[str], - new_words: typing.List[str], window_size = 4) -> str: + new_words: typing.List[str], window_size = 6) -> str: if old_words == new_words: return " ".join(old_words) elif len(old_words) >= window_size and len(new_words) >= window_size: diff --git a/transcribe.py b/transcribe.py index a2b1486..7cf4170 100644 --- a/transcribe.py +++ b/transcribe.py @@ -317,7 +317,8 @@ if __name__ == "__main__": send_audio_thd.daemon = True send_audio_thd.start() - print("Press enter or say 'Clear' to start a new message") + print("Press enter or say 'Clear' to start a new message. Say 'Over' to " + + "pause the display (saying 'Clear' resets it again).") for line in sys.stdin: resetAudio(audio_state) if "exit" in line or "quit" in line: -- cgit v1.2.3