Spaces:
Configuration error
Configuration error
| #!/usr/bin/env python3 | |
| import os | |
| import sys | |
| print("=== CosyVoice Installation Test ===") | |
| # Check if models are downloaded | |
| models_path = "pretrained_models" | |
| if os.path.exists(models_path): | |
| print(f"\nModels directory exists: {models_path}") | |
| for model in os.listdir(models_path): | |
| model_path = os.path.join(models_path, model) | |
| if os.path.isdir(model_path): | |
| size = sum(os.path.getsize(os.path.join(dirpath, filename)) | |
| for dirpath, dirnames, filenames in os.walk(model_path) | |
| for filename in filenames) / (1024 * 1024 * 1024) # GB | |
| print(f" - {model}: {size:.2f} GB") | |
| else: | |
| print(f"Models directory not found: {models_path}") | |
| # Check Python environment | |
| print(f"\nPython version: {sys.version}") | |
| # Check key dependencies | |
| try: | |
| import torch | |
| print(f"PyTorch version: {torch.__version__}") | |
| print(f"CUDA available: {torch.cuda.is_available()}") | |
| if torch.cuda.is_available(): | |
| print(f"CUDA version: {torch.version.cuda}") | |
| except ImportError: | |
| print("PyTorch not installed") | |
| try: | |
| import torchaudio | |
| print(f"Torchaudio version: {torchaudio.__version__}") | |
| except ImportError: | |
| print("Torchaudio not installed") | |
| try: | |
| import onnxruntime | |
| print(f"ONNX Runtime version: {onnxruntime.__version__}") | |
| except ImportError: | |
| print("ONNX Runtime not installed") | |
| print("\n=== Test Complete ===") | |
| print("\nTo run CosyVoice after downloads complete:") | |
| print("1. Ensure all models are fully downloaded") | |
| print("2. Run: python3 quick_cosyvoice_test.py") | |
| print("\nCosyVoice is now installed and ready to use!") |