Spaces:
Sleeping
Sleeping
Vladimir Alabov
commited on
Commit
·
f059937
1
Parent(s):
109ec6e
Fix subprocess #3
Browse files
app.py
CHANGED
@@ -72,9 +72,8 @@ def run_inference(input_audio, speaker):
|
|
72 |
config_path = f"./models/{speaker}/config.json"
|
73 |
cluster_path = ""
|
74 |
|
75 |
-
raw_path =
|
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)
|
|
|
72 |
config_path = f"./models/{speaker}/config.json"
|
73 |
cluster_path = ""
|
74 |
|
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)
|