Spaces:
Running
Running
Fix safegaurd against mono or already surround files
Browse files
app.py
CHANGED
@@ -259,8 +259,9 @@ def smart_mode_process(input_file, api_key, multi_singer=False):
|
|
259 |
os.unlink(wav)
|
260 |
p((0, 8), "Loading File")
|
261 |
|
262 |
-
if data.ndim != 2:
|
263 |
-
raise gr.Error("Expected stereo input")
|
|
|
264 |
L, R = data[:, 0], data[:, 1]
|
265 |
|
266 |
# Step 1: LFE from lowpass
|
|
|
259 |
os.unlink(wav)
|
260 |
p((0, 8), "Loading File")
|
261 |
|
262 |
+
if data.ndim != 2 or data.shape[1] != 2:
|
263 |
+
raise gr.Error("Expected stereo input (2 channels), got something else.")
|
264 |
+
|
265 |
L, R = data[:, 0], data[:, 1]
|
266 |
|
267 |
# Step 1: LFE from lowpass
|