Spaces:
Runtime error
Runtime error
StormblessedKal
commited on
Commit
•
b7866b5
1
Parent(s):
d71b153
bugfix
Browse files- 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,
|
259 |
shutil.rmtree(os.path.join(output_dir,gen_id))
|
260 |
-
return {"voice_clone":f"https://
|
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,
|
302 |
shutil.rmtree(os.path.join(output_dir,gen_id))
|
303 |
-
return {"voice_clone_emotions":f"https://
|
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,
|
353 |
shutil.rmtree(os.path.join(output_dir,gen_id))
|
354 |
-
return {"voice_clone_with_multi_lang":f"https://
|
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 |
|