From 8d225cfd66dfb60998b4eab43d8aa3b287375695 Mon Sep 17 00:00:00 2001 From: yum Date: Tue, 20 Dec 2022 00:26:50 -0800 Subject: GUI: Begin work generating animator The GUI can now generate guid.map and animations. --- Scripts/transcribe.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Scripts/transcribe.py') diff --git a/Scripts/transcribe.py b/Scripts/transcribe.py index 0f7ae37..831ae66 100644 --- a/Scripts/transcribe.py +++ b/Scripts/transcribe.py @@ -94,6 +94,8 @@ def onAudioFramesAvailable( frame_count, time_info, status_flags): + if audio_state.audio_paused: + return (frames, pyaudio.paContinue) # Reduce sample rate from mic rate to Whisper rate by dropping frames. decimated = b'' @@ -207,7 +209,6 @@ def transcribe(audio_state, model, frames): #for temp in (0.00, 0.05, 0.10, 0.15, 0.20): #for temp in (0.00, 0.05): for temp in (0.00,): - print("temp: {}".format(temp)) options = whisper.DecodingOptions(language = audio_state.language, beam_size = 5, temperature = temp, without_timestamps = True) result = whisper.decode(model, mel, options) -- cgit v1.2.3