Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -103,6 +103,7 @@ def rename_stems(input_file, output_dir, stems, output_format):
|
|
| 103 |
for i, stem in enumerate(stems):
|
| 104 |
new_name = f"{base_name}_(Stem{i+1}).{output_format}"
|
| 105 |
new_path = os.path.join(output_dir, new_name)
|
|
|
|
| 106 |
os.rename(stem, new_path)
|
| 107 |
renamed_stems.append(new_path)
|
| 108 |
return renamed_stems
|
|
@@ -129,6 +130,8 @@ def roformer_separator(audio, model_key, seg_size, overlap, model_dir, out_dir,
|
|
| 129 |
progress(0.7, desc="Audio separated")
|
| 130 |
separation = separator.separate(audio)
|
| 131 |
|
|
|
|
|
|
|
| 132 |
progress(0.9, desc="Stems renamed")
|
| 133 |
stems = rename_stems(audio, out_dir, separation, out_format)
|
| 134 |
|
|
|
|
| 103 |
for i, stem in enumerate(stems):
|
| 104 |
new_name = f"{base_name}_(Stem{i+1}).{output_format}"
|
| 105 |
new_path = os.path.join(output_dir, new_name)
|
| 106 |
+
print(f"Renaming {stem} to {new_path}")
|
| 107 |
os.rename(stem, new_path)
|
| 108 |
renamed_stems.append(new_path)
|
| 109 |
return renamed_stems
|
|
|
|
| 130 |
progress(0.7, desc="Audio separated")
|
| 131 |
separation = separator.separate(audio)
|
| 132 |
|
| 133 |
+
print(f"Separation result: {separation}")
|
| 134 |
+
|
| 135 |
progress(0.9, desc="Stems renamed")
|
| 136 |
stems = rename_stems(audio, out_dir, separation, out_format)
|
| 137 |
|