Closed xhzhu0628 closed 4 months ago
Queuing appears to mostly work for me, but I'm open to any PRs. Whisper has a threads/workers option. Converting to discussion if you wanted to try a PR.
cpu_threads=whisper_threads, num_workers=concurrent_transcriptions
import threading from queue import Queue
start queue
task_queue = Queue()
start queue lock
task_queue_lock = threading.Lock()
def transcription_worker(): while True: task = task_queue.get()
activate thread
threading.Thread(target=transcription_worker, daemon=True).start()