removed home
This commit is contained in:
@ -45,7 +45,16 @@ def main():
|
||||
device = "cpu"
|
||||
compute_type = "int8"
|
||||
|
||||
model = WhisperModel(model_name, device=device, compute_type=compute_type)
|
||||
try:
|
||||
model = WhisperModel(model_name, device=device, compute_type=compute_type)
|
||||
except RuntimeError as e:
|
||||
if "out of memory" in str(e).lower() and device == "cuda":
|
||||
print(f"CUDA OOM, falling back to CPU (int8)", file=sys.stderr)
|
||||
device = "cpu"
|
||||
compute_type = "int8"
|
||||
model = WhisperModel(model_name, device=device, compute_type=compute_type)
|
||||
else:
|
||||
raise
|
||||
|
||||
# Transcribe with progress reporting
|
||||
print(f"Starting transcription of {wav_path} with model {model_name}", file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user