Spaces:
Sleeping
Sleeping
Upload infertest.py
Browse files- infertest.py +2 -3
infertest.py
CHANGED
@@ -472,15 +472,14 @@ def cut_vocal_and_inst(audio_path,spk_id):
|
|
472 |
|
473 |
|
474 |
def combine_vocal_and_inst(vocal_path, inst_path):
|
475 |
-
|
476 |
-
print(inst_path)
|
477 |
vocal_volume=1
|
478 |
inst_volume=1
|
479 |
os.makedirs("output/result", exist_ok=True)
|
480 |
# Assuming vocal_path and inst_path are now directly passed as arguments
|
481 |
output_path = "output/result/combine.mp3"
|
482 |
#command = f'ffmpeg -y -i "{inst_path}" -i "{vocal_path}" -filter_complex [0:a]volume={inst_volume}[i];[1:a]volume={vocal_volume}[v];[i][v]amix=inputs=2:duration=longest[a] -map [a] -b:a 320k -c:a libmp3lame "{output_path}"'
|
483 |
-
command=f'ffmpeg -y -i "inst_path" -i "vocal_path" -filter_complex "amix=inputs=2:duration=longest" -b:a 320k -c:a libmp3lame "{output_path}"'
|
484 |
result = subprocess.run(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
485 |
if result.stderr:
|
486 |
print("Error:", result.stderr.decode())
|
|
|
472 |
|
473 |
|
474 |
def combine_vocal_and_inst(vocal_path, inst_path):
|
475 |
+
|
|
|
476 |
vocal_volume=1
|
477 |
inst_volume=1
|
478 |
os.makedirs("output/result", exist_ok=True)
|
479 |
# Assuming vocal_path and inst_path are now directly passed as arguments
|
480 |
output_path = "output/result/combine.mp3"
|
481 |
#command = f'ffmpeg -y -i "{inst_path}" -i "{vocal_path}" -filter_complex [0:a]volume={inst_volume}[i];[1:a]volume={vocal_volume}[v];[i][v]amix=inputs=2:duration=longest[a] -map [a] -b:a 320k -c:a libmp3lame "{output_path}"'
|
482 |
+
command=f'ffmpeg -y -i "{inst_path}" -i "{vocal_path}" -filter_complex "amix=inputs=2:duration=longest" -b:a 320k -c:a libmp3lame "{output_path}"'
|
483 |
result = subprocess.run(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
484 |
if result.stderr:
|
485 |
print("Error:", result.stderr.decode())
|