diff options
| author | yum <yum.food.vr@gmail.com> | 2022-12-30 00:01:28 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2022-12-30 00:01:28 -0800 |
| commit | abdaa7ce215086bf1070d6093731cd35df866cbb (patch) | |
| tree | 5b17cf5f699e9e21dd479dd17d69a65727fa28c7 /Scripts/transcribe.py | |
| parent | 12bcd1d40df21cb9bad6ae353ea4f6697e1275a6 (diff) | |
Fine-tune transcription
Bump up recording window to 28 seconds. This helps a lot with long-form
transcription tasks, s.a. transcribing an audiobook.
We should expose this as a parameter, since at 10s the transcription delay is
typically 300ms, while at 28s it's typically 1.1-1.2s.
Diffstat (limited to 'Scripts/transcribe.py')
| -rw-r--r-- | Scripts/transcribe.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Scripts/transcribe.py b/Scripts/transcribe.py index 37a8407..21bb4ba 100644 --- a/Scripts/transcribe.py +++ b/Scripts/transcribe.py @@ -35,7 +35,7 @@ class AudioState: # The maximum length that recordAudio() will put into frames before it # starts dropping from the start. - self.MAX_LENGTH_S = 10 + self.MAX_LENGTH_S = 28 self.MAX_LENGTH_S_WHISPER = 30 # The minimum length that recordAudio() will wait for before saving audio. self.MIN_LENGTH_S = 1 @@ -283,7 +283,7 @@ def transcribeAudio(audio_state, model): old_text = audio_state.text audio_state.text = string_matcher.matchStrings(audio_state.text, - text, window_size = 20) + text, window_size = 25) if old_text != audio_state.text: # We think the user said something, so reset the amount of # time we sleep between transcriptions to the minimum. |
