Vladimir Alabov commited on
Commit
d99b549
1 Parent(s): f059937

Fix subprocess #4

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -16,8 +16,6 @@ logging.getLogger('matplotlib').setLevel(logging.WARNING)
16
 
17
  limitation = os.getenv("SYSTEM") == "spaces" # limit audio length in huggingface spaces
18
 
19
- INFERENCE_OUTPUT_DIRNAME = '/output/'
20
-
21
  audio_postprocess_ori = gr.Audio.postprocess
22
 
23
  def audio_postprocess(self, y):
@@ -75,7 +73,7 @@ def run_inference(input_audio, speaker):
75
  raw_path = 'tmp.wav'
76
  soundfile.write(raw_path, audio, 16000, format="wav")
77
 
78
- 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'}"
79
  print(inference_cmd)
80
  # out_audio, out_sr = model.infer(sid, vc_transform, raw_path,
81
  # auto_predict_f0=True,
 
16
 
17
  limitation = os.getenv("SYSTEM") == "spaces" # limit audio length in huggingface spaces
18
 
 
 
19
  audio_postprocess_ori = gr.Audio.postprocess
20
 
21
  def audio_postprocess(self, y):
 
73
  raw_path = 'tmp.wav'
74
  soundfile.write(raw_path, audio, 16000, format="wav")
75
 
76
+ 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 out.wav {'' if is_pitch_prediction_enabled else '--no-auto-predict-f0'}"
77
  print(inference_cmd)
78
  # out_audio, out_sr = model.infer(sid, vc_transform, raw_path,
79
  # auto_predict_f0=True,