Spaces:
Sleeping
Sleeping
Upload infertest.py
Browse files478 unmodified lines479480481482482483484485486487488489490491492493494478 unmodified lines # Assuming vocal_path and inst_path are now directly passed as arguments output_path = "output/result/combine.mp3" #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}"' 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}"' #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}"' command = [ 'ffmpeg', '-y', '-i', inst_path, '-i', vocal_path, '-filter_complex', 'amix=inputs=2:duration=longest', '-b:a', '320k', '-c:a', 'libmp3lame', output_path] result = subprocess.run(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) if result.stderr: print("Error:", result.stderr.decode())infertest.py+10-1