From 247f163efd46a58b2fbb5e7e26e0d141252dc651 Mon Sep 17 00:00:00 2001 From: yum Date: Sun, 16 Oct 2022 23:48:15 -0700 Subject: Add continuous transcription mode Algorithm: * look at last 20 chars of last committed transcription * scan new transcription using 10-char sliding window * find spot where distance is minimized * stitch two messages together Thus we're able to maintain a continuously growing transcription without having to feed the AI more than 30 seconds of data at a time. Seems to work reasonably well in bench tests. Also fix silence detection. AI exposes a probability that nothing was said. Hand-pick a probability of 0.1. Sometimes the AI still goes sicko mode with this setting but going higher occasionally results in no transcription. --- osc_ctrl.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'osc_ctrl.py') diff --git a/osc_ctrl.py b/osc_ctrl.py index d80f055..761ff78 100644 --- a/osc_ctrl.py +++ b/osc_ctrl.py @@ -241,8 +241,6 @@ def resizeBoard(num_lines, tx_state, shrink_only): # This may take multiple calls to complete. Returns True once it's done. def sendMessageLazy(client, msg, tx_state): lines = splitMessage(msg) - #resizeBoard(len(lines), tx_state, shrink_only=False) - msg_encoded = encodeMessage(lines) msg_encoded_len = len(msg_encoded) -- cgit v1.2.3