smjain commited on
Commit
1864f11
1 Parent(s): 616982f

Upload myinfer_latest.py

Browse files
Files changed (1) hide show
  1. myinfer_latest.py +4 -4
myinfer_latest.py CHANGED
@@ -203,7 +203,7 @@ def api_convert_voice():
203
  except Empty:
204
  print("Queue was empty or worker did not complete in time")
205
 
206
- #output_path = output_queue.get()
207
  #if isinstance(output_path, Exception):
208
  # print("Exception in worker:", output_path)
209
  #else:
@@ -250,9 +250,9 @@ def get_processed_audio(audio_id):
250
 
251
  def worker(spk_id, input_audio_path, voice_transform, unique_id, output_queue):
252
  try:
253
- #output_audio_path = convert_voice(spk_id, input_audio_path, voice_transform, unique_id)
254
- #print("output in worker for audio file", output_audio_path)
255
- output_queue.put("test")
256
  print("added to output queue")
257
  except Exception as e:
258
  print("exception in adding to queue")
 
203
  except Empty:
204
  print("Queue was empty or worker did not complete in time")
205
 
206
+ output_path = output_queue.get()
207
  #if isinstance(output_path, Exception):
208
  # print("Exception in worker:", output_path)
209
  #else:
 
250
 
251
  def worker(spk_id, input_audio_path, voice_transform, unique_id, output_queue):
252
  try:
253
+ output_audio_path = convert_voice(spk_id, input_audio_path, voice_transform, unique_id)
254
+ print("output in worker for audio file", output_audio_path)
255
+ output_queue.put(output_audio_path)
256
  print("added to output queue")
257
  except Exception as e:
258
  print("exception in adding to queue")