Spaces:
Sleeping
Sleeping
Upload myinfer_latest.py
Browse files223 unmodified lines22422522622722722822923023123223323421 unmodified lines256257258259260261262263223 unmodified lines #logs.append("Starting the audio splitting process...") #yield "\n".join(logs), None, None print("before executing splitter") command = f"demucs --two-stems=vocals -n {split_model} {audio_path} -o -o output/{spk_id}_{unique_id}" command = f"demucs --two-stems=vocals -n {split_model} {audio_path} -o output/{spk_id}_{unique_id}" #result = subprocess.Popen(command.split(), stdout=subprocess.PIPE, text=True) result = subprocess.run(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) if result.returncode != 0:21 unmodified lines #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}"' # Load the audio files print(vocal_path) print(inst_path) vocal = AudioSegment.from_file(vocal_path) instrumental = AudioSegment.from_file(inst_path)
myinfer_latest.py+7-1