Spaces:
Running
Running
Upload infertest.py
Browse files- infertest.py +6 -4
infertest.py
CHANGED
@@ -127,12 +127,12 @@ def api_convert_voice():
|
|
127 |
inst = f"output/{split_model}/{spk_id}_input_audio/no_vocals.wav"
|
128 |
|
129 |
output_path = convert_voice(spk_id, vocal_path, voice_transform)
|
130 |
-
|
131 |
-
print(
|
132 |
|
133 |
|
134 |
-
if os.path.exists(
|
135 |
-
return send_file(
|
136 |
else:
|
137 |
return jsonify({"error": "File not found."}), 404
|
138 |
|
@@ -472,6 +472,8 @@ def cut_vocal_and_inst(audio_path,spk_id):
|
|
472 |
|
473 |
|
474 |
def combine_vocal_and_inst(vocal_path, inst_path):
|
|
|
|
|
475 |
vocal_volume=1
|
476 |
inst_volume=1
|
477 |
os.makedirs("output/result", exist_ok=True)
|
|
|
127 |
inst = f"output/{split_model}/{spk_id}_input_audio/no_vocals.wav"
|
128 |
|
129 |
output_path = convert_voice(spk_id, vocal_path, voice_transform)
|
130 |
+
output_path1= combine_vocal_and_inst(output_path,inst)
|
131 |
+
print(output_path1)
|
132 |
|
133 |
|
134 |
+
if os.path.exists(output_path1):
|
135 |
+
return send_file(output_path1, as_attachment=True)
|
136 |
else:
|
137 |
return jsonify({"error": "File not found."}), 404
|
138 |
|
|
|
472 |
|
473 |
|
474 |
def combine_vocal_and_inst(vocal_path, inst_path):
|
475 |
+
print(vocal_path)
|
476 |
+
print(inst_path)
|
477 |
vocal_volume=1
|
478 |
inst_volume=1
|
479 |
os.makedirs("output/result", exist_ok=True)
|