ahmetoner / whisper-asr-webservice

OpenAI Whisper ASR Webservice API
https://ahmetoner.github.io/whisper-asr-webservice
MIT License
2.11k stars 379 forks source link

Increase concurrency capability #241

Open daiDai-study opened 1 month ago

daiDai-study commented 1 month ago

I want to increase concurrency capability, but i see source code like:

    with model_lock:
        segments = []
        text = ""
        segment_generator, info = model.transcribe(audio, beam_size=5, **options_dict)
        for segment in segment_generator:
            segments.append(segment)
            text = text + segment.text
        result = {"language": options_dict.get("language", info.language), "segments": segments, "text": text}

can i remove the lock?