helloWorld199 commited on
Commit
d0db4b3
1 Parent(s): e20e705

Update src/main.py

Browse files
Files changed (1) hide show
  1. src/main.py +4 -2
src/main.py CHANGED
@@ -260,12 +260,14 @@ def song_cover_pipeline(main_vocals, backup_vocals, voice_model, pitch_change, k
260
  song_id = None
261
  raise_exception(error_msg, is_webui)
262
 
 
 
263
  song_dir = os.path.join(output_dir, song_id)
264
  print(f"DEBUG PRINT: song_dir {song_dir}")
265
 
266
  pitch_change = pitch_change * 12 + pitch_change_all
267
- ai_vocals_path = os.path.join(song_dir, f'{os.path.splitext(os.path.basename(main_vocals))[0]}_{voice_model}_p{pitch_change}_i{index_rate}_fr{filter_radius}_rms{rms_mix_rate}_pro{protect}_{f0_method}{"" if f0_method != "mangio-crepe" else f"_{crepe_hop_length}"}.wav')
268
- ai_cover_path = os.path.join(song_dir, f'{os.path.splitext(os.path.basename(main_vocals))[0]} ({voice_model} Ver)_cover.{output_format}')
269
 
270
  print(f"DEBUG PRINT: ai_vocals_path: {ai_vocals_path}, ai_cover_path: {ai_cover_path}")
271
 
 
260
  song_id = None
261
  raise_exception(error_msg, is_webui)
262
 
263
+ orig_song_path = convert_to_stereo(main_vocals)
264
+
265
  song_dir = os.path.join(output_dir, song_id)
266
  print(f"DEBUG PRINT: song_dir {song_dir}")
267
 
268
  pitch_change = pitch_change * 12 + pitch_change_all
269
+ ai_vocals_path = os.path.join(song_dir, f'{os.path.splitext(os.path.basename(orig_song_path))[0]}_{voice_model}_p{pitch_change}_i{index_rate}_fr{filter_radius}_rms{rms_mix_rate}_pro{protect}_{f0_method}{"" if f0_method != "mangio-crepe" else f"_{crepe_hop_length}"}.wav')
270
+ ai_cover_path = os.path.join(song_dir, f'{os.path.splitext(os.path.basename(orig_song_path))[0]} ({voice_model} Ver)_cover.{output_format}')
271
 
272
  print(f"DEBUG PRINT: ai_vocals_path: {ai_vocals_path}, ai_cover_path: {ai_cover_path}")
273