CoolFace
Apppublic

LyndonCatan/audio-forensic-app

sourceHugging Faceupdated 8mo agoView on Hugging Face
1likes
debug_engine.py40 linesDownload Raw Back to root
1import subprocess2import sys3import os4 5def check_system():6    print("\n=== FORENSIC SONAR: SYSTEM DIAGNOSTIC ===")7    8    # 1. Check Python9    print(f"1. Python Version: {sys.version.split()[0]}")10 11    # 2. Check Demucs12    try:13        import demucs14        print("2. ✅ Demucs: INSTALLED")15    except ImportError:16        print("2. ❌ Demucs: NOT FOUND")17        print("   FIX: Run 'pip install demucs' in your terminal.")18 19    # 3. Check FFmpeg20    try:21        ffmpeg_check = subprocess.run(["ffmpeg", "-version"], capture_output=True, text=True)22        if ffmpeg_check.returncode == 0:23            print("3. ✅ FFmpeg: INSTALLED")24        else:25            print("3. ❌ FFmpeg: ERROR DETECTED")26    except FileNotFoundError:27        print("3. ❌ FFmpeg: NOT FOUND")28        print("   FIX: You must install FFmpeg and add it to your System PATH.")29 30    # 4. Check Folder Permissions31    public_path = os.path.join(os.getcwd(), "public", "separated_audio")32    if os.path.exists(public_path):33        print(f"4. ✅ Output Folder: EXISTS")34    else:35        print(f"4. ❌ Output Folder: MISSING ({public_path})")36 37    print("========================================\n")38 39if __name__ == "__main__":40    check_system()