summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2022-12-22 13:34:05 -0800
committeryum <yum.food.vr@gmail.com>2022-12-22 13:35:32 -0800
commit02a1cfb67bbd67bbaca53de77ce3aad97648427b (patch)
treef43bbff20faba772aef4a496a14bd995299b2210
parent4af8dd1915e7ae53ee6c9a1ce1800bda5cdd4061 (diff)
Quick hack: don't exponentially back off when unpaused
This fixed some slowness I was seeing when waking up the STT. The right fix is to add interruptible sleeps. Let's fix this soon.
-rw-r--r--Scripts/transcribe.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Scripts/transcribe.py b/Scripts/transcribe.py
index c72fb9f..e883704 100644
--- a/Scripts/transcribe.py
+++ b/Scripts/transcribe.py
@@ -237,7 +237,10 @@ def transcribeAudio(audio_state, model):
last_transcribe_time = time.time()
while audio_state.run_app == True:
# Pace this out
- time.sleep(audio_state.transcribe_sleep_duration)
+ if audio_state.audio_paused:
+ time.sleep(audio_state.transcribe_sleep_duration)
+ else:
+ time.sleep(0.05)
# Increase sleep time. Code below will set sleep time back to minimum
# if a change is detected.