Spaces:
Sleeping
Sleeping
helloWorld199
commited on
Commit
•
787717e
1
Parent(s):
47d74b1
Update src/main.py
Browse files- src/main.py +5 -3
src/main.py
CHANGED
@@ -264,10 +264,12 @@ def song_cover_pipeline(main_vocals, backup_vocals, voice_model, pitch_change, k
|
|
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'_{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'({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 |
|
|
|
264 |
|
265 |
song_dir = os.path.join(output_dir, song_id)
|
266 |
print(f"DEBUG PRINT: song_dir {song_dir}")
|
267 |
+
if not os.path.exists(song_dir):
|
268 |
+
os.makedirs(song_dir)
|
269 |
+
|
270 |
pitch_change = pitch_change * 12 + pitch_change_all
|
271 |
+
ai_vocals_path = os.path.join(song_dir, f'{os.path.basename(os.path.splitext(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')
|
272 |
+
ai_cover_path = os.path.join(song_dir, f'{os.path.basename(os.path.splitext(main_vocals)[0])}({voice_model} Ver)_cover.{output_format}')
|
273 |
|
274 |
print(f"DEBUG PRINT: ai_vocals_path: {ai_vocals_path}, ai_cover_path: {ai_cover_path}")
|
275 |
|