语音识别阶段出错:[openai-whisper(本地)] 无效的值或参数:Expected parameter logits (Tensor of shape (1, 51865)) of distribution Categorical(logits: torch.Size([1, 51865])) to satisfy the constraint IndependentConstraint(Real(), 1), but found invalid values:
tensor([[nan, nan, nan, ..., nan, nan, nan]], device='cuda:0'):
Traceback (most recent call last):
File "videotrans\task\job.py", line 112, in run
File "videotrans\task\_speech2text.py", line 91, in recogn
File "videotrans\recognition\__init__.py", line 178, in run
File "videotrans\recognition\_base.py", line 78, in run
File "videotrans\recognition\_openai.py", line 70, in _exec
File "whisper\transcribe.py", line 295, in transcribe
result: DecodingResult = decode_with_fallback(mel_segment)
File "whisper\transcribe.py", line 201, in decode_with_fallback
decode_result = model.decode(segment, options)
File "torch\utils\_contextlib.py", line 116, in decorate_context
return func(args, *kwargs)
File "whisper\decoding.py", line 824, in decode
result = DecodingTask(model, options).run(mel)
File "torch\utils\_contextlib.py", line 116, in decorate_context
return func(args, *kwargs)
File "whisper\decoding.py", line 737, in run
tokens, sum_logprobs, no_speech_probs = self._main_loop(audio_features, tokens)
File "whisper\decoding.py", line 703, in _main_loop
tokens, completed = self.decoder.update(tokens, logits, sum_logprobs)
File "whisper\decoding.py", line 283, in update
next_tokens = Categorical(logits=logits / self.temperature).sample()
File "torch\distributions\categorical.py", line 73, in __init__
super().__init__(batch_shape, validate_args=validate_args)
File "torch\distributions\distribution.py", line 72, in __init__
raise ValueError(
ValueError: Expected parameter logits (Tensor of shape (1, 51865)) of distribution Categorical(logits: torch.Size([1, 51865])) to satisfy the constraint IndependentConstraint(Real(), 1), but found invalid values:
tensor([[nan, nan, nan, ..., nan, nan, nan]], device='cuda:0')