Spaces:
Sleeping
Sleeping
Upload myinfer_latest.py
Browse files24 unmodified lines252627282829303115 unmodified lines4748495050515253134 unmodified lines18818919019119119219319424 unmodified linesimport uuidfrom threading import Semaphorefrom threading import Lockfrom multiprocessing import Process, Queue, set_start_methodfrom multiprocessing import Process, Queue, set_start_method,get_context
15 unmodified lines# Initialize the semaphore with the maximum number of concurrent requestsrequest_semaphore = Semaphore(MAX_CONCURRENT_REQUESTS)
set_start_method('spawn', force=True)#set_start_method('spawn', force=True)from lib.infer_pack.models import ( SynthesizerTrnMs256NSFsid, SynthesizerTrnMs256NSFsid_nono,134 unmodified lines inst = f"output/{spk_id}_{unique_id}/{split_model}/{spk_id}_input_audio_{unique_id}/no_vocals.wav" print("*****before making call to convert ", unique_id) output_queue = Queue() ctx = get_context('spawn') # Create and start the process p = Process(target=worker, args=(spk_id, vocal_path, voice_transform, unique_id, output_queue)) p.start()myinfer_latest.py+3-3