Spaces:
Sleeping
Sleeping
Upload myinfer_latest.py
Browse files- myinfer_latest.py +3 -3
myinfer_latest.py
CHANGED
|
@@ -25,7 +25,7 @@ from pydub import AudioSegment
|
|
| 25 |
import uuid
|
| 26 |
from threading import Semaphore
|
| 27 |
from threading import Lock
|
| 28 |
-
from multiprocessing import Process,
|
| 29 |
from queue import Empty
|
| 30 |
|
| 31 |
|
|
@@ -187,8 +187,8 @@ def api_convert_voice():
|
|
| 187 |
vocal_path = f"output/{spk_id}_{unique_id}/{split_model}/{spk_id}_input_audio_{unique_id}/vocals.wav"
|
| 188 |
inst = f"output/{spk_id}_{unique_id}/{split_model}/{spk_id}_input_audio_{unique_id}/no_vocals.wav"
|
| 189 |
print("*****before making call to convert ", unique_id)
|
| 190 |
-
output_queue =
|
| 191 |
-
ctx = get_context('
|
| 192 |
# Create and start the process
|
| 193 |
p = ctx.Process(target=worker, args=(spk_id, vocal_path, voice_transform, unique_id, output_queue))
|
| 194 |
p.start()
|
|
|
|
| 25 |
import uuid
|
| 26 |
from threading import Semaphore
|
| 27 |
from threading import Lock
|
| 28 |
+
from multiprocessing import Process, SimpleQueue, set_start_method,get_context
|
| 29 |
from queue import Empty
|
| 30 |
|
| 31 |
|
|
|
|
| 187 |
vocal_path = f"output/{spk_id}_{unique_id}/{split_model}/{spk_id}_input_audio_{unique_id}/vocals.wav"
|
| 188 |
inst = f"output/{spk_id}_{unique_id}/{split_model}/{spk_id}_input_audio_{unique_id}/no_vocals.wav"
|
| 189 |
print("*****before making call to convert ", unique_id)
|
| 190 |
+
output_queue = SimpleQueue()
|
| 191 |
+
ctx = get_context('spawn')
|
| 192 |
# Create and start the process
|
| 193 |
p = ctx.Process(target=worker, args=(spk_id, vocal_path, voice_transform, unique_id, output_queue))
|
| 194 |
p.start()
|