File size: 1,062 Bytes
f317798
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import os
import sys

print(f"Python: {sys.version}")

try:
    import numpy
    print(f"Numpy: {numpy.__version__}")
except ImportError as e:
    print(f"Numpy error: {e}")

try:
    import librosa
    print(f"Librosa: {librosa.__version__}")
except ImportError as e:
    print(f"Librosa error: {e}")

try:
    import tensorflow as tf
    print(f"TensorFlow: {tf.__version__}")
except ImportError as e:
    print(f"TensorFlow error: {e}")

# Try loading one file
try:
    test_file = r"c:\Users\ASUS\lung_ai_project\data\cough\healthy\101_1b1_Al_sc_Meditron.wav"
    if os.path.exists(test_file):
        print(f"Testing librosa load on {test_file}")
        y, sr = librosa.load(test_file, duration=1)
        print(f"Loaded audio shape: {y.shape}, SR: {sr}")
        
        mfccs = librosa.feature.mfcc(y=y, sr=sr, n_mfcc=13)
        print(f"MFCC shape: {mfccs.shape}")
    else:
        print("Test file not found (ok if directory structure changed)")
except Exception as e:
    print(f"Librosa processing error: {e}")