KasaHealth / utils /debug_env.py
78anand's picture
Upload folder using huggingface_hub
f317798 verified
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}")