#3079 TaskCfg(cache_folder='D:/Program Files/win-pyvideotrans-v3.96/tmp/10952/8462c0143a', target_dir='E:/DownLoads/DCL/_video

240e:44d* Posted at: 16 hours ago 👁15

语音识别阶段出错 [openai-whisper(本地)] Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 78, in openai_whisper
File "whisper\transcribe.py", line 295, in transcribe
File "whisper\transcribe.py", line 201, in decode_with_fallback
File "torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "whisper\decoding.py", line 824, in decode
File "torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "whisper\decoding.py", line 737, in run
File "whisper\decoding.py", line 703, in _main_loop
File "whisper\decoding.py", line 283, in update
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, 51866)) of distribution Categorical(logits: torch.Si
......
([1, 51866])) 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 106, in run
File "videotrans\task\trans_create.py", line 358, in recogn
File "videotrans\recognition\__init__.py", line 284, in run
File "videotrans\recognition\_base.py", line 141, in run
File "videotrans\recognition\_overall.py", line 61, in _exec
File "videotrans\recognition\_overall.py", line 106, in _openai
File "videotrans\configure\_base.py", line 276, in _new_process
RuntimeError: Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 78, in openai_whisper
File "whisper\transcribe.py", line 295, in transcribe
File "whisper\transcribe.py", line 201, in decode_with_fallback
File "torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "whisper\decoding.py", line 824, in decode
File "torch\utils\_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "whisper\decoding.py", line 737, in run
File "whisper\decoding.py", line 703, in _main_loop
File "whisper\decoding.py", line 283, in update
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, 51866)) of distribution Categorical(logits: torch.Size([1, 51866])) to satisfy the constraint IndependentConstraint(Real(), 1), but found invalid values:
tensor([[nan, nan, nan, ..., nan, nan, nan]], device='cuda:0')
TaskCfg(cache_folder='D:/Program Files/win-pyvideotrans-v3.96/tmp/10952/8462c0143a', target_dir='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4', remove_noise=False, is_separate=False, detect_language='en', subtitle_language=None, source_language='英语', target_language='简体中文', source_language_code='en', target_language_code='zh-cn', source_sub='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/en.srt', target_sub='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/zh-cn.srt', source_wav='D:/Program Files/win-pyvideotrans-v3.96/tmp/10952/8462c0143a/en.wav', source_wav_output='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/en.m4a', target_wav='D:/Program Files/win-pyvideotrans-v3.96/tmp/10952/8462c0143a/target.wav', target_wav_output='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/zh-cn.m4a', subtitles='', novoice_mp4='D:/Program Files/win-pyvideotrans-v3.96/tmp/10952/8462c0143a/novoice.mp4', noextname='Lustful Libertines – Mommy asked me to pee in her pussy', shibie_audio=None, targetdir_mp4='E:/DownLoads/DCL/_video_out/Lustful Libertines – Mommy asked me to pee in her pussy-mp4/Lustful Libertines – Mommy asked me to pee in her pussy.mp4', instrument=None, vocal=None, back_audio='', background_music=None, app_mode='tiqu', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', copysrt_rawvideo=False, clear_cache=False, translate_type=2, tts_type=0, recogn_type=1, model_name='large-v3-turbo', voice_autorate=False, video_autorate=False, cuda=True, name='E:/DownLoads/DCL/Lustful Libertines – Mommy asked me to pee in her pussy.mp4', basename='Lustful Libertines – Mommy asked me to pee in her pussy.mp4', ext='mp4', dirname='E:/DownLoads/DCL', shound_del_name=None, uuid='8462c0143a', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=0, only_out_mp4=False, fix_punc=False, recogn2pass=True)


=
system:Windows-10-10.0.26100-SP0
version:v3.96
frozen:True
language:zh
root_dir:D:/Program Files/win-pyvideotrans-v3.96

1 Replies

这是由于 openai-whisper 模型在处理时产生了 NaN(非数字)值,通常与模型文件损坏、显存不足或 CUDA 环境问题有关。

  1. 清理并重新下载模型:删除 models/whisper/ 目录下的 large-v3-turbo 模型文件夹,然后重启软件让其重新下载。
  2. 检查 CUDA 环境:确保已正确安装 CUDA 12.8 和 cuDNN 9.x。在 CMD 中运行 nvcc -Vnvidia-smi 验证。
  3. 降低模型精度或使用 CPU:在语音识别设置中,尝试将模型精度改为 int8fp16。如果问题依旧,暂时关闭 CUDA 加速(cuda=False)使用 CPU 运行以排除 GPU 问题。
  4. 更换识别渠道:作为临时解决方案,可改用 faster-whisper 渠道进行语音识别。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Related resource

Similar issues already exist