Vladimir Alabov commited on
Commit
109ec6e
1 Parent(s): 9c2dd26

Fix subprocess #2

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -68,15 +68,15 @@ def run_inference(input_audio, speaker):
68
  f0_method = "dio"
69
  transpose = 0
70
 
71
- model_path = f"/models/{speaker}/{speaker}.pth"
72
- config_path = f"/models/{speaker}/config.json"
73
  cluster_path = ""
74
 
75
  raw_path = io.BytesIO()
76
  soundfile.write(raw_path, audio, 16000, format="wav")
77
  raw_path.seek(0)
78
 
79
- inference_cmd = f"svc infer {raw_path} -m {model_path} -c {config_path} {f'-k {cluster_path} -r {cluster_ratio}' if cluster_path != '' and cluster_ratio > 0 else ''} -t {transpose} --f0-method {f0_method} -n {noise_scale} -o {INFERENCE_OUTPUT_DIRNAME}/out.wav {'' if is_pitch_prediction_enabled else '--no-auto-predict-f0'}"
80
  print(inference_cmd)
81
  # out_audio, out_sr = model.infer(sid, vc_transform, raw_path,
82
  # auto_predict_f0=True,
 
68
  f0_method = "dio"
69
  transpose = 0
70
 
71
+ model_path = f"./models/{speaker}/{speaker}.pth"
72
+ config_path = f"./models/{speaker}/config.json"
73
  cluster_path = ""
74
 
75
  raw_path = io.BytesIO()
76
  soundfile.write(raw_path, audio, 16000, format="wav")
77
  raw_path.seek(0)
78
 
79
+ inference_cmd = f"svc infer {raw_path} -m {model_path} -c {config_path} {f'-k {cluster_path} -r {cluster_ratio}' if cluster_path != '' and cluster_ratio > 0 else ''} -t {transpose} --f0-method {f0_method} -n {noise_scale} -o {INFERENCE_OUTPUT_DIRNAME}out.wav {'' if is_pitch_prediction_enabled else '--no-auto-predict-f0'}"
80
  print(inference_cmd)
81
  # out_audio, out_sr = model.infer(sid, vc_transform, raw_path,
82
  # auto_predict_f0=True,