morsczx commited on
Commit
4d83bb5
1 Parent(s): a6b210d

changed compute type

Browse files
Files changed (1) hide show
  1. audio_processing.py +1 -1
audio_processing.py CHANGED
@@ -24,7 +24,7 @@ logger = logging.getLogger(__name__)
24
  def load_whisper_model(model_size="small"):
25
  logger.info(f"Loading Whisper model (size: {model_size})...")
26
  device = "cuda" if torch.cuda.is_available() else "cpu"
27
- compute_type = "float16" if device == "cuda" else "int8"
28
  try:
29
  model = whisperx.load_model(model_size, device, compute_type=compute_type)
30
  logger.info(f"Whisper model loaded successfully on {device}")
 
24
  def load_whisper_model(model_size="small"):
25
  logger.info(f"Loading Whisper model (size: {model_size})...")
26
  device = "cuda" if torch.cuda.is_available() else "cpu"
27
+ compute_type = "int8" if torch.cuda.is_available() else "float32"
28
  try:
29
  model = whisperx.load_model(model_size, device, compute_type=compute_type)
30
  logger.info(f"Whisper model loaded successfully on {device}")