summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2022-10-27 19:15:48 -0700
committeryum <yum.food.vr@gmail.com>2022-10-27 19:15:48 -0700
commit113f2858016c252b97cac96eab454ee16b2dcda2 (patch)
treef0b3f61ae10e2f33584d0479354accfe65f8e15e
parent40d8fc288059e38a59c21ec2502eac059257b44e (diff)
Tweak continuous transcription
Stitching new uses 6 word sliding window instead of 4 word. Seems to dramatically improve transcription quality.
-rw-r--r--string_matcher.py2
-rw-r--r--transcribe.py3
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: