Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -135,7 +135,7 @@ def prepare_output_dir(input_file, output_dir):
|
|
135 |
raise
|
136 |
return out_dir
|
137 |
|
138 |
-
def roformer_separator(audio, model_key, seg_size, override_seg_size, overlap, pitch_shift, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress()):
|
139 |
"""Separate audio using Roformer model."""
|
140 |
print_message(audio, model_key)
|
141 |
model = ROFORMER_MODELS[model_key]
|
@@ -171,7 +171,7 @@ def roformer_separator(audio, model_key, seg_size, override_seg_size, overlap, p
|
|
171 |
logging.error(f"Roformer separation failed: {e}")
|
172 |
return None, None
|
173 |
|
174 |
-
def mdx23c_separator(audio, model, seg_size, override_seg_size, overlap, pitch_shift, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress()):
|
175 |
"""Separate audio using MDX23C model."""
|
176 |
print_message(audio, model)
|
177 |
try:
|
@@ -206,7 +206,7 @@ def mdx23c_separator(audio, model, seg_size, override_seg_size, overlap, pitch_s
|
|
206 |
logging.error(f"MDX23C separation failed: {e}")
|
207 |
return None, None
|
208 |
|
209 |
-
def mdx_separator(audio, model, hop_length, seg_size, overlap, denoise, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress()):
|
210 |
"""Separate audio using MDX-NET model."""
|
211 |
print_message(audio, model)
|
212 |
try:
|
@@ -241,7 +241,7 @@ def mdx_separator(audio, model, hop_length, seg_size, overlap, denoise, model_di
|
|
241 |
logging.error(f"MDX-NET separation failed: {e}")
|
242 |
return None, None
|
243 |
|
244 |
-
def vr_separator(audio, model, window_size, aggression, tta, post_process, post_process_threshold, high_end_process, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress()):
|
245 |
"""Separate audio using VR ARCH model."""
|
246 |
print_message(audio, model)
|
247 |
try:
|
@@ -278,7 +278,7 @@ def vr_separator(audio, model, window_size, aggression, tta, post_process, post_
|
|
278 |
logging.error(f"VR ARCH separation failed: {e}")
|
279 |
return None, None
|
280 |
|
281 |
-
def demucs_separator(audio, model, seg_size, shifts, overlap, segments_enabled, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress()):
|
282 |
"""Separate audio using Demucs model."""
|
283 |
print_message(audio, model)
|
284 |
try:
|
|
|
135 |
raise
|
136 |
return out_dir
|
137 |
|
138 |
+
def roformer_separator(audio, model_key, seg_size, override_seg_size, overlap, pitch_shift, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress(track_tqdm=True)):
|
139 |
"""Separate audio using Roformer model."""
|
140 |
print_message(audio, model_key)
|
141 |
model = ROFORMER_MODELS[model_key]
|
|
|
171 |
logging.error(f"Roformer separation failed: {e}")
|
172 |
return None, None
|
173 |
|
174 |
+
def mdx23c_separator(audio, model, seg_size, override_seg_size, overlap, pitch_shift, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress(track_tqdm=True)):
|
175 |
"""Separate audio using MDX23C model."""
|
176 |
print_message(audio, model)
|
177 |
try:
|
|
|
206 |
logging.error(f"MDX23C separation failed: {e}")
|
207 |
return None, None
|
208 |
|
209 |
+
def mdx_separator(audio, model, hop_length, seg_size, overlap, denoise, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress(track_tqdm=True)):
|
210 |
"""Separate audio using MDX-NET model."""
|
211 |
print_message(audio, model)
|
212 |
try:
|
|
|
241 |
logging.error(f"MDX-NET separation failed: {e}")
|
242 |
return None, None
|
243 |
|
244 |
+
def vr_separator(audio, model, window_size, aggression, tta, post_process, post_process_threshold, high_end_process, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress(track_tqdm=True)):
|
245 |
"""Separate audio using VR ARCH model."""
|
246 |
print_message(audio, model)
|
247 |
try:
|
|
|
278 |
logging.error(f"VR ARCH separation failed: {e}")
|
279 |
return None, None
|
280 |
|
281 |
+
def demucs_separator(audio, model, seg_size, shifts, overlap, segments_enabled, model_dir, out_dir, out_format, norm_thresh, amp_thresh, progress=gr.Progress(track_tqdm=True)):
|
282 |
"""Separate audio using Demucs model."""
|
283 |
print_message(audio, model)
|
284 |
try:
|