Spaces:
Running
Running
Update separwator.py
Browse files- separwator.py +24 -4
separwator.py
CHANGED
@@ -203,7 +203,12 @@ def roformer_separator(audio, model_key, out_format, segment_size, override_seg_
|
|
203 |
separator.load_model(model_filename=roformer_model)
|
204 |
|
205 |
progress(0.7, desc="Separating audio...")
|
206 |
-
|
|
|
|
|
|
|
|
|
|
|
207 |
|
208 |
stems = [os.path.join(out_dir, file_name) for file_name in separation]
|
209 |
return stems[1], stems[0]
|
@@ -234,7 +239,12 @@ def mdxc_separator(audio, model, out_format, segment_size, override_seg_size, ov
|
|
234 |
separator.load_model(model_filename=model)
|
235 |
|
236 |
progress(0.7, desc="Separating audio...")
|
237 |
-
|
|
|
|
|
|
|
|
|
|
|
238 |
|
239 |
stems = [os.path.join(out_dir, file_name) for file_name in separation]
|
240 |
return stems[1], stems[0]
|
@@ -266,7 +276,12 @@ def mdxnet_separator(audio, model, out_format, hop_length, segment_size, denoise
|
|
266 |
separator.load_model(model_filename=model)
|
267 |
|
268 |
progress(0.7, desc="Separating audio...")
|
269 |
-
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
stems = [os.path.join(out_dir, file_name) for file_name in separation]
|
272 |
return stems[0], stems[1]
|
@@ -300,7 +315,12 @@ def vrarch_separator(audio, model, out_format, window_size, aggression, tta, pos
|
|
300 |
separator.load_model(model_filename=model)
|
301 |
|
302 |
progress(0.7, desc="Separating audio...")
|
303 |
-
|
|
|
|
|
|
|
|
|
|
|
304 |
|
305 |
stems = [os.path.join(out_dir, file_name) for file_name in separation]
|
306 |
return stems[0], stems[1]
|
|
|
203 |
separator.load_model(model_filename=roformer_model)
|
204 |
|
205 |
progress(0.7, desc="Separating audio...")
|
206 |
+
output_names = {
|
207 |
+
"Vocals": f"{base_name}_vocals",
|
208 |
+
"Instrumental": f"{base_name}_instrumental",
|
209 |
+
}
|
210 |
+
|
211 |
+
separation = separator.separate(audio, output_names)
|
212 |
|
213 |
stems = [os.path.join(out_dir, file_name) for file_name in separation]
|
214 |
return stems[1], stems[0]
|
|
|
239 |
separator.load_model(model_filename=model)
|
240 |
|
241 |
progress(0.7, desc="Separating audio...")
|
242 |
+
output_names = {
|
243 |
+
"Vocals": f"{base_name}_vocals",
|
244 |
+
"Instrumental": f"{base_name}_instrumental",
|
245 |
+
}
|
246 |
+
|
247 |
+
separation = separator.separate(audio, output_names)
|
248 |
|
249 |
stems = [os.path.join(out_dir, file_name) for file_name in separation]
|
250 |
return stems[1], stems[0]
|
|
|
276 |
separator.load_model(model_filename=model)
|
277 |
|
278 |
progress(0.7, desc="Separating audio...")
|
279 |
+
output_names = {
|
280 |
+
"Vocals": f"{base_name}_vocals",
|
281 |
+
"Instrumental": f"{base_name}_instrumental",
|
282 |
+
}
|
283 |
+
|
284 |
+
separation = separator.separate(audio, output_names)
|
285 |
|
286 |
stems = [os.path.join(out_dir, file_name) for file_name in separation]
|
287 |
return stems[0], stems[1]
|
|
|
315 |
separator.load_model(model_filename=model)
|
316 |
|
317 |
progress(0.7, desc="Separating audio...")
|
318 |
+
output_names = {
|
319 |
+
"Vocals": f"{base_name}_vocals",
|
320 |
+
"Instrumental": f"{base_name}_instrumental",
|
321 |
+
}
|
322 |
+
|
323 |
+
separation = separator.separate(audio, output_names)
|
324 |
|
325 |
stems = [os.path.join(out_dir, file_name) for file_name in separation]
|
326 |
return stems[0], stems[1]
|