From 8326dee0bf01956b450858212cbdba3403b32b0d Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 14 Dec 2022 21:45:30 -0800 Subject: Optimize transcription latency Shave off ~500ms due to locking. Acquiring a threading.Lock takes hundreds of milliseconds and the global interpreter lock already takes care of most crashy race conditions, so just remove the locks. Avoid writing audio to disk, saving more time (and disk wear / IOPS). Add basic profiling to transcribe(). Omit timestamps, since we don't use them (maybe we should!) Shorten noise indicators to 350ms The whisper behavior where it repeats tokens causes certain transcriptions to take many seconds. I haven't thought about how to fix this, yet. --- Sounds/Noise_Off.wav | Bin 159822 -> 67278 bytes Sounds/Noise_On.wav | Bin 90190 -> 67278 bytes 2 files changed, 0 insertions(+), 0 deletions(-) (limited to 'Sounds') diff --git a/Sounds/Noise_Off.wav b/Sounds/Noise_Off.wav index 7c8a9bf..0d3843c 100644 Binary files a/Sounds/Noise_Off.wav and b/Sounds/Noise_Off.wav differ diff --git a/Sounds/Noise_On.wav b/Sounds/Noise_On.wav index 925b3ed..28c8f6b 100644 Binary files a/Sounds/Noise_On.wav and b/Sounds/Noise_On.wav differ -- cgit v1.2.3