|
|
| import sys
|
| import os
|
|
|
| print("Debugging WhisperX on CPU...")
|
| print(f"Python: {sys.version}")
|
|
|
| try:
|
| import torch
|
| print(f"PyTorch version: {torch.__version__}")
|
| except ImportError:
|
| print("PyTorch not found!")
|
|
|
| try:
|
| import whisperx_legen_fork as whisperx
|
| print("WhisperX module imported successfully.")
|
| except ImportError as e:
|
| print(f"Failed to import whisperx_legen_fork: {e}")
|
| sys.exit(1)
|
|
|
| device = "cpu"
|
| compute_type = "float32"
|
|
|
| print(f"Attempting to load model 'tiny' on {device} with {compute_type}...")
|
|
|
| try:
|
| model = whisperx.load_model(
|
| "tiny",
|
| device=device,
|
| compute_type=compute_type,
|
| asr_options={"repetition_penalty": 1, "prompt_reset_on_temperature": 0.5, "no_repeat_ngram_size": 2}
|
| )
|
| print("SUCCESS: Model loaded correctly!")
|
| except Exception as e:
|
| print("\nERROR loading model:")
|
| print(e)
|
| import traceback
|
| traceback.print_exc()
|
|
|
| print("Done.")
|
|
|