Spaces:
Running
Running
Upload myinfer_latest.py
Browse files- myinfer_latest.py +10 -4
myinfer_latest.py
CHANGED
@@ -196,11 +196,17 @@ def api_convert_voice():
|
|
196 |
# Wait for the process to finish and get the result
|
197 |
p.join()
|
198 |
print("*******waiting for process to complete ")
|
199 |
-
|
200 |
-
|
201 |
-
print("Exception in worker:", output_path)
|
202 |
-
else:
|
203 |
print("output path of converted voice", output_path)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
#output_path = convert_voice(spk_id, vocal_path, voice_transform,unique_id)
|
205 |
output_path1= combine_vocal_and_inst(output_path,inst,unique_id)
|
206 |
|
|
|
196 |
# Wait for the process to finish and get the result
|
197 |
p.join()
|
198 |
print("*******waiting for process to complete ")
|
199 |
+
try:
|
200 |
+
output_path = output_queue.get(timeout=10) # Wait for 10 seconds
|
|
|
|
|
201 |
print("output path of converted voice", output_path)
|
202 |
+
except queue.Empty:
|
203 |
+
print("Queue was empty or worker did not complete in time")
|
204 |
+
|
205 |
+
#output_path = output_queue.get()
|
206 |
+
#if isinstance(output_path, Exception):
|
207 |
+
# print("Exception in worker:", output_path)
|
208 |
+
#else:
|
209 |
+
# print("output path of converted voice", output_path)
|
210 |
#output_path = convert_voice(spk_id, vocal_path, voice_transform,unique_id)
|
211 |
output_path1= combine_vocal_and_inst(output_path,inst,unique_id)
|
212 |
|