StormblessedKal commited on
Commit
b7866b5
1 Parent(s): d71b153
Files changed (1) hide show
  1. src/predict.py +6 -6
src/predict.py CHANGED
@@ -255,9 +255,9 @@ class Predictor:
255
  final_output = str(openvoice_output).replace('wav',output_extension)
256
  self.convert_wav_to_output_extension(openvoice_output,final_output)
257
 
258
- self.upload_file_to_s3(final_output,'demovidelyusergenerations',f"{gen_id}-voice-clone.{output_extension}")
259
  shutil.rmtree(os.path.join(output_dir,gen_id))
260
- return {"voice_clone":f"https://demovidelyusergenerations.s3.amazonaws.com/{gen_id}-voice-clone.{output_extension}"
261
  }
262
 
263
 
@@ -298,9 +298,9 @@ class Predictor:
298
  sf.write(openvoice_output,wav1,new_sr)
299
  final_ouput = str(openvoice_output).replace('wav',output_extension)
300
  self.convert_wav_to_output_extension(openvoice_output,final_ouput)
301
- self.upload_file_to_s3(final_ouput,'demovidelyusergenerations',f"{gen_id}-voice-clone-emotions.{output_extension}")
302
  shutil.rmtree(os.path.join(output_dir,gen_id))
303
- return {"voice_clone_emotions":f"https://demovidelyusergenerations.s3.amazonaws.com/{gen_id}-voice-clone-emotions.{output_extension}",
304
  }
305
 
306
 
@@ -349,9 +349,9 @@ class Predictor:
349
  final_output = str(multi_lang_with_voice_clone_path).replace('wav',output_extension)
350
  self.convert_wav_to_output_extension(multi_lang_with_voice_clone_path,final_output)
351
  print(final_output)
352
- self.upload_file_to_s3(final_output,'demovidelyusergenerations',f"{gen_id}-voice-clone-multi-lang.{output_extension}")
353
  shutil.rmtree(os.path.join(output_dir,gen_id))
354
- return {"voice_clone_with_multi_lang":f"https://demovidelyusergenerations.s3.amazonaws.com/{gen_id}-voice-clone-multi-lang.{output_extension}"
355
  }
356
 
357
 
 
255
  final_output = str(openvoice_output).replace('wav',output_extension)
256
  self.convert_wav_to_output_extension(openvoice_output,final_output)
257
 
258
+ self.upload_file_to_s3(final_output,bucket_name,f"{gen_id}-voice-clone.{output_extension}")
259
  shutil.rmtree(os.path.join(output_dir,gen_id))
260
+ return {"voice_clone":f"https://{bucket_name}.s3.amazonaws.com/{gen_id}-voice-clone.{output_extension}"
261
  }
262
 
263
 
 
298
  sf.write(openvoice_output,wav1,new_sr)
299
  final_ouput = str(openvoice_output).replace('wav',output_extension)
300
  self.convert_wav_to_output_extension(openvoice_output,final_ouput)
301
+ self.upload_file_to_s3(final_ouput,bucket_name,f"{gen_id}-voice-clone-emotions.{output_extension}")
302
  shutil.rmtree(os.path.join(output_dir,gen_id))
303
+ return {"voice_clone_emotions":f"https://{bucket_name}.s3.amazonaws.com/{gen_id}-voice-clone-emotions.{output_extension}",
304
  }
305
 
306
 
 
349
  final_output = str(multi_lang_with_voice_clone_path).replace('wav',output_extension)
350
  self.convert_wav_to_output_extension(multi_lang_with_voice_clone_path,final_output)
351
  print(final_output)
352
+ self.upload_file_to_s3(final_output,bucket_name,f"{gen_id}-voice-clone-multi-lang.{output_extension}")
353
  shutil.rmtree(os.path.join(output_dir,gen_id))
354
+ return {"voice_clone_with_multi_lang":f"https://{bucket_name}.s3.amazonaws.com/{gen_id}-voice-clone-multi-lang.{output_extension}"
355
  }
356
 
357