mirror of
https://github.com/openai/whisper.git
synced 2026-01-08 04:54:02 -05:00
abort find_alignment on empty input
This commit is contained in:
@@ -170,6 +170,9 @@ def find_alignment(
|
||||
medfilt_width: int = 7,
|
||||
qk_scale: float = 1.0,
|
||||
) -> List[WordTiming]:
|
||||
if len(text_tokens) == 0:
|
||||
return []
|
||||
|
||||
tokens = torch.tensor(
|
||||
[
|
||||
*tokenizer.sot_sequence,
|
||||
|
||||
Reference in New Issue
Block a user