diff --git a/dependency_check.py b/dependency_check.py new file mode 100644 index 0000000..4e01b51 --- /dev/null +++ b/dependency_check.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +""" +Check if all Kyutai TTS dependencies are properly installed +""" + +import sys + +def check_dependencies(): + print("๐Ÿ” Checking Kyutai TTS Dependencies") + print("=" * 40) + + dependencies = [ + "torch", + "numpy", + "einops", + "transformers", + "accelerate", + "soundfile", + "librosa", + "huggingface_hub", + "moshi", + "sphn" + ] + + missing = [] + installed = [] + + for dep in dependencies: + try: + __import__(dep) + installed.append(dep) + print(f"โœ“ {dep}") + except ImportError as e: + missing.append((dep, str(e))) + print(f"โœ— {dep}: {e}") + + print(f"\n๐Ÿ“Š Summary:") + print(f"โœ“ Installed: {len(installed)}") + print(f"โœ— Missing: {len(missing)}") + + if missing: + print(f"\n๐Ÿ”ง To fix missing dependencies:") + for dep, error in missing: + print(f"pip install {dep}") + + print(f"\n๐Ÿงช Testing Kyutai TTS imports:") + try: + from moshi.models.loaders import CheckpointInfo + print("โœ“ CheckpointInfo import successful") + except Exception as e: + print(f"โœ— CheckpointInfo import failed: {e}") + + try: + from moshi.models.tts import DEFAULT_DSM_TTS_REPO, DEFAULT_DSM_TTS_VOICE_REPO, TTSModel + print("โœ“ TTSModel imports successful") + except Exception as e: + print(f"โœ— TTSModel imports failed: {e}") + + return len(missing) == 0 + +if __name__ == "__main__": + success = check_dependencies() + if success: + print("\n๐ŸŽ‰ All dependencies are installed correctly!") + else: + print("\nโŒ Some dependencies are missing. Please install them first.") + sys.exit(1) \ No newline at end of file