Fixed closing UI not ending threads

This commit is contained in:
SevaSk 2023-05-22 21:28:16 -04:00
parent 178fc26d94
commit 392235ec29

View File

@ -78,12 +78,14 @@ def main():
global_transcriber = AudioTranscriber(user_audio_recorder.source, speaker_audio_recorder.source)
transcribe = threading.Thread(target=global_transcriber.transcribe_audio_queue, args=(audio_queue,))
transcribe.daemon = True
transcribe.start()
print(f"[INFO] Whisper using GPU: " + str(torch.cuda.is_available()))
responder = GPTResponder()
respond = threading.Thread(target=responder.respond_to_transcriber, args=(global_transcriber,))
respond.daemon = True
respond.start()
print("READY")