42 lines
974 B
Python
42 lines
974 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Test script for audio dependencies
|
|
"""
|
|
|
|
def test_audio_dependencies():
|
|
"""Test if all audio dependencies are installed"""
|
|
try:
|
|
import torchcodec
|
|
print("torchcodec: OK")
|
|
except ImportError as e:
|
|
print(f"torchcodec: FAILED - {e}")
|
|
return False
|
|
|
|
try:
|
|
import datasets
|
|
print("datasets: OK")
|
|
except ImportError as e:
|
|
print(f"datasets: FAILED - {e}")
|
|
return False
|
|
|
|
try:
|
|
import soundfile
|
|
print("soundfile: OK")
|
|
except ImportError as e:
|
|
print(f"soundfile: FAILED - {e}")
|
|
return False
|
|
|
|
try:
|
|
import librosa
|
|
print("librosa: OK")
|
|
except ImportError as e:
|
|
print(f"librosa: FAILED - {e}")
|
|
return False
|
|
|
|
print("All audio dependencies installed successfully")
|
|
return True
|
|
|
|
if __name__ == "__main__":
|
|
success = test_audio_dependencies()
|
|
if not success:
|
|
exit(1) |