Skip to content

Commit

Permalink
save output audio to results folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ricecakey06 authored Apr 3, 2023
1 parent ce08d86 commit 54f5217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def vc_fn(sid, input_audio, vc_transform, auto_f0,cluster_ratio, slice_db, noise
_audio = model.slice_inference(temp_path, sid, vc_transform, slice_db, cluster_ratio, auto_f0, noise_scale,pad_seconds,cl_num,lg_num,lgr_num)
model.clear_empty()
os.remove(temp_path)
#构建保存文件的路径,并保存到raw文件夹内
#构建保存文件的路径,并保存到results文件夹内
timestamp = str(int(time.time()))
output_file = os.path.join("raw", sid + "_" + timestamp + ".wav")
output_file = os.path.join("results", sid + "_" + timestamp + ".wav")
soundfile.write(output_file, _audio, model.target_sample, format="wav")
return "Success", (model.target_sample, _audio)
except Exception as e:
Expand Down

0 comments on commit 54f5217

Please sign in to comment.