()
| 333 | DEBUG = False |
| 334 | |
| 335 | def run_debug(): |
| 336 | examples_dir = os.path.join(os.path.dirname(__file__), "examples") |
| 337 | test_path = os.path.join(examples_dir, "acoustic_guitar.wav") |
| 338 | test_text = "acoustic guitar" |
| 339 | print("\n" + "=" * 50) |
| 340 | print("[DEBUG] Starting inference test for both models") |
| 341 | print("=" * 50) |
| 342 | |
| 343 | if not os.path.exists(test_path): |
| 344 | print(f"[DEBUG] Skip: {test_path} not found") |
| 345 | return |
| 346 | |
| 347 | print(f"\n[DEBUG] Using test audio: {test_path}") |
| 348 | |
| 349 | print("\n" + "-" * 40) |
| 350 | print("[DEBUG] AudioSep inference") |
| 351 | print("-" * 40) |
| 352 | print("[DEBUG] Loading AudioSep model...") |
| 353 | out_audiosep = separate_audiosep(test_path, test_text) |
| 354 | print(f"[DEBUG] AudioSep done. Output sr={out_audiosep[0]}, shape={np.array(out_audiosep[1]).shape}") |
| 355 | |
| 356 | print("\n" + "-" * 40) |
| 357 | print("[DEBUG] FlowSep inference") |
| 358 | print("-" * 40) |
| 359 | print("[DEBUG] Loading FlowSep model...") |
| 360 | out_flowsep = separate_flowsep(test_path, test_text) |
| 361 | print(f"[DEBUG] FlowSep done. Output sr={out_flowsep[0]}, shape={np.array(out_flowsep[1]).shape}") |
| 362 | |
| 363 | print("\n" + "=" * 50) |
| 364 | print("[DEBUG] Both models passed inference test") |
| 365 | print("=" * 50 + "\n") |
| 366 | |
| 367 | |
| 368 | if __name__ == "__main__": |
no test coverage detected