Spaces:
Sleeping
Sleeping
changed compute type
Browse files- 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 = "
|
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}")
|