Skip to content

Commit

Permalink
fix: catch for IndexError
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Jun 6, 2024
1 parent 25dc3e8 commit 65c4529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capgen/transcriber/transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(
try:
self.model = WhisperModel(**model_parameters, flash_attention=True)

except ValueError:
except (ValueError, IndexError):
self.model = WhisperModel(**model_parameters)

async def transcribe(self, file: str | BinaryIO, caption_format: str) -> str | None:
Expand Down

0 comments on commit 65c4529

Please sign in to comment.