Vladimir Alabov commited on
Commit
7f29eee
1 Parent(s): 01a3172
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -60,12 +60,12 @@ def run_inference(input_audio, speaker):
60
  if sampling_rate != 16000:
61
  audio = librosa.resample(audio, orig_sr=sampling_rate, target_sr=16000)
62
 
63
- #TODO edit from GUI
64
- cluster_ratio = 1
65
- noise_scale = 2
66
- is_pitch_prediction_enabled = True
67
- f0_method = "dio"
68
- transpose = 0
69
 
70
  model_path = f"/models/{speaker}/{speaker}.pth"
71
  config_path = f"/models/{speaker}/config.json"
@@ -81,13 +81,13 @@ def run_inference(input_audio, speaker):
81
  # auto_predict_f0=True,
82
  # )
83
 
84
- result = subprocess.run(
85
- inference_cmd.split(),
86
- stdout=subprocess.PIPE,
87
- stderr=subprocess.STDOUT,
88
- text=True
89
- )
90
- print(result)
91
  return "Success", "TODO" # (44100, out_audio.cpu().numpy())
92
 
93
  if __name__ == '__main__':
 
60
  if sampling_rate != 16000:
61
  audio = librosa.resample(audio, orig_sr=sampling_rate, target_sr=16000)
62
 
63
+ #TODO edit from GUI
64
+ cluster_ratio = 1
65
+ noise_scale = 2
66
+ is_pitch_prediction_enabled = True
67
+ f0_method = "dio"
68
+ transpose = 0
69
 
70
  model_path = f"/models/{speaker}/{speaker}.pth"
71
  config_path = f"/models/{speaker}/config.json"
 
81
  # auto_predict_f0=True,
82
  # )
83
 
84
+ result = subprocess.run(
85
+ inference_cmd.split(),
86
+ stdout=subprocess.PIPE,
87
+ stderr=subprocess.STDOUT,
88
+ text=True
89
+ )
90
+ print(result)
91
  return "Success", "TODO" # (44100, out_audio.cpu().numpy())
92
 
93
  if __name__ == '__main__':