#5085 TaskCfgVTT(is_cuda=True, uuid='873c06b383', cache_folder='E:/short/app/win-pyvideotrans-v3.99-0508/tmp/101456/873c06b383

240e:3b7* Posted at: 1 day ago

语音识别阶段出错 [faster-whisper(本地)] Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 356, in faster_whisper
File "faster_whisper\transcribe.py", line 689, in init
ValueError: Requested int8_float16 compute type, but the target device or backend do not support efficient int8_float16 computation.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 367, in faster_whisper
File "faster_whisper\transcribe.py", line 689, in init
ValueError: Requested float16 compute type, but the target device or backend do not support efficient float16 computation.

Traceback (most recent call last):
File "videotrans\task\job.py", line 105, in run
File "videotrans\task\trans_create.py", line 390, in recogn
File "videotrans\recognition\__init__.py", line 293, in run
File "videotrans\recognition\_base.py", line 143, in run
File "videotrans\recognition\_overall.py", line 33, in _exec
File "videotrans\recognition\_overall.py", line 106, in _faster
File "videotrans\configure\_base.py", line 289, in _new_process
RuntimeError: Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 356, in faster_whisper
File "faster_whisper\transcribe.py", line 689, in init
ValueError: Requested int8_float16 compute type, but the target device or backend do not support efficient int8_float16 computation.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 367, in faster_whisper
File "faster_whisper\transcribe.py", line 689, in init
ValueError: Requested float16 compute type, but the target device or backend do not support efficient float16 computation.
TaskCfgVTT(is_cuda=True, uuid='873c06b383', cache_folder='E:/short/app/win-pyvideotrans-v3.99-0508/tmp/101456/873c06b383', target_dir='E:/short/zip/霸情恶少的小逃妻/subtitles/46-mp4', source_language='简体中文', source_language_code='zh-cn', source_sub='E:/short/zip/霸情恶少的小逃妻/subtitles/46-mp4/zh-cn.srt', source_wav='E:/short/app/win-pyvideotrans-v3.99-0508/tmp/101456/873c06b383/zh-cn.wav', source_wav_output='E:/short/zip/霸情恶少的小逃妻/subtitles/46-mp4/zh-cn.m4a', target_language='英语', target_language_code='en', target_sub='E:/short/zip/霸情恶少的小逃妻/subtitles/46-mp4/en.srt', target_wav='E:/short/app/win-pyvideotrans-v3.99-0508/tmp/101456/873c06b383/target.wav', target_wav_output='E:/short/zip/霸情恶少的小逃妻/subtitles/46-mp4/en.m4a', name='E:/short/zip/霸情恶少的小逃妻/46.mp4', noextname='46', basename='46.mp4', ext='mp4', dirname='E:/short/zip/霸情恶少的小逃妻', shound_del_name=None, translate_type=0, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='zh-cn', recogn_type=0, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='tiqu', subtitles='', targetdir_mp4='E:/short/zip/霸情恶少的小逃妻/subtitles/46-mp4/46.mp4', novoice_mp4='E:/short/app/win-pyvideotrans-v3.99-0508/tmp/101456/873c06b383/novoice.mp4', is_separate=False, embed_bgm=True, instrument=None, vocal='E:/short/app/win-pyvideotrans-v3.99-0508/tmp/101456/873c06b383/vocal.wav', back_audio='', clear_cache=True, background_music=None, subtitle_type=0, only_out_mp4=False, recogn2pass=True, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8)


=
system:Windows-10-10.0.19045-SP0
version:v3.99
frozen:True
language:zh
root_dir:E:/short/app/win-pyvideotrans-v3.99-0508

15 Replies

这是由于您的显卡或CUDA环境不支持 int8_float16float16 类型的计算。常见原因:显卡较老(如 GTX 10 系列之前)、CUDA 版本低于 12.8、未安装 cuDNN 或版本不匹配。

解决方案:

  1. 检查 CUDA 和 cuDNN 版本:确保已安装 CUDA 12.8+ 和 cuDNN 9.11+。可在命令行执行 nvcc -V 查看 CUDA 版本,并确认 cuDNN 已正确配置。
  2. 切换 CUDA 数据类型:打开菜单 工具 → 高级选项 → 语音识别参数,将 CUDA数据类型 改为 default(推荐)或 float32,然后保存重试。
  3. 降级为 CPU 运行:如果仍失败,取消勾选主界面的 CUDA加速,使用 CPU 模式(速度会慢,但可正常使用)。
  4. 更新显卡驱动:确保驱动为最新版,支持 CUDA 12.8。

请查阅相关文档:

我没有点击启动CUDA啊 我是没有勾选的

您没有勾选 CUDA 加速,但日志中 is_cuda=True,说明软件在启动时检测到了您电脑上的 NVIDIA 显卡,并自动启用了 GPU 模式。这通常不是 bug,而是程序行为——只要检测到可用的 CUDA 环境,就会尝试调用显卡加速。

解决方法是:

  1. 手动强制禁用 CUDA:打开软件安装目录下 videotrans/params.json 文件,找到 "is_cuda" 字段,将其值改为 false,保存后重启软件。
  2. 调整数据类型:如果仍报错,请进入菜单 → 工具 → 高级选项 → 语音识别参数,将 CUDA数据类型 设置为 defaultfloat32(不要选 int8_float16 或 float16),保存后重启。

目前好慢。是不是没有使用上gpu加速可以帮我看看吗

检测是否为 GPU 加速的方法是:

  1. 打开任务管理器(Ctrl+Shift+Esc),切换到“性能”标签,点击 GPU 查看 GPU 使用率。
  2. 在执行语音识别时,如果 GPU 使用率明显升高(>10%),则说明正在使用 GPU;如果始终为 0%,则实际使用的是 CPU。

从您之前的报错看,软件本来试图用 GPU,但因为 compute type 不匹配导致回退到了 CPU。您改为 default 后,大部分老旧显卡仍可能无法高效支持,很可能仍在 CPU 运行。

解决办法:强制指定为 CPU,并优化 CPU 参数:

  1. 禁用 GPU 检测:打开软件目录下的 videotrans/params.json,将 "is_cuda": true 改为 "is_cuda": false,保存后重启。
  2. 调大 CPU 并行数:点击菜单 → 工具 → 高级选项 → 通用设置,将 CPU同时任务数[重启生效] 设置为你的 CPU 核数(例如 8 或 16),保存后重启软件。
  3. 换用小模型:语音识别模型从 large-v3-turbo 改为 smallbase,CPU 模式下能明显提速。
注意:您使用的是 Windows 预打包版,已经内置了 ffmpeg 和基础模型,无需额外配置。

如果您想确认 GPU 是否能真正加速,请确保:

  • 已安装 CUDA 12.8+ 和 cuDNN 9.11+
  • 显卡驱动已更新
  • 菜单 → 工具 → 高级选项 → 语音识别参数CUDA数据类型 选择 default(不要选 int8_float16 或 float16)

若仍不提升,则说明您的显卡不兼容当前 CUDA 版本,建议使用 CPU 模式并调大线程数。

我按你直接说的已经选择了float32

请确认您已执行以下关键步骤来强制关闭 GPU 加速:打开 videotrans/params.json(位于软件安装根目录下),找到 "is_cuda",将其值改为 false,保存后重启软件。完成此操作后,软件将完全使用 CPU 运行,不会再尝试调用显卡,从而避免因 GPU 不兼容导致的回退和卡顿。同时,为了提升 CPU 处理速度,请按以下建议调整:1. 点击菜单 → 工具 → 高级选项 → 通用设置,将 CPU同时任务数[重启生效] 设置为你的 CPU 核心数(例如 8 或 16)。2. 将语音识别模型从 large-v3-turbo 更换为 smallbase,小模型在 CPU 上明显更快。3. 如果仍感觉慢,可以进一步调低 高级选项 → 语音识别参数 中的 beam_sizebest_of 至 1。

我不肯定是想要有准确性的前提下去提速。目前看起来gpu没有使用上。想知道原因。是没有开启还是啥原因

您的显卡未能成功启用 GPU 加速,根本原因是 CUDA 环境不兼容(版本不够或缺少 cuDNN),导致 faster-whisper 尝试调用 GPU 时失败并自动回退到 CPU。即使您没有勾选 CUDA 加速,软件检测到显卡也会尝试使用,失败后降级到 CPU,这就是现在很慢的原因。

如何确认 GPU 是否真正在工作

  • 打开任务管理器 → 性能 → GPU → 在执行语音识别时观察 GPU 使用率。
  • 如果 GPU 使用率低于 5%(甚至为 0%),说明实际跑在 CPU 上。

想让 GPU 真正加速,必须满足以下条件

  1. 安装 CUDA 12.8+(查看:nvcc -V
  2. 安装 cuDNN 9.11+(检查 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\lib\x64 下是否有 cudnn*.lib
  3. 显卡驱动已更新(支持 CUDA 12.8)
  4. 高级选项中 CUDA 数据类型选 default(不要选 int8_float16float16

如果已经正确安装但依然没有加速

  • 可能是显卡太老(如 GTX 960 以下)或显存不足(<4GB),模型 large-v3-turbo 可能因显存不够而放弃 GPU。
  • 建议换用 small 模型 并检查是否有改善。

加速准确性的折中方案(纯 CPU)

如果确定显卡无法使用,请在 videotrans/params.json 中设置 "is_cuda": false,关闭 GPU 检测,并提升 CPU 并行数:
菜单 → 工具 → 高级选项 → 通用设置 → CPU同时任务数 设为 CPU 核心数(如 8),重启软件,使用 large-v3 模型 + CPU 多线程,速度仍有保障,且准确度最高。

这种模型精度是和什么有关。是文字的准确性吗

模型精度主要就是指语音识别后文字的准确性,包括错别字、漏字、同音错误和无法识别等。
影响精度的关键因素按权重排序如下:

  1. 模型大小:large-v3 > medium > small > base > tiny。越大越准确,但也越吃显存/内存和耗时。
  2. 原始语言选择是否正确:错误的选择会导致识别结果完全乱码(不要依赖“自动检测”)。
  3. 音频质量:背景噪音、多人声混乱、采样率过低都会严重降低准确率。开启“降噪”或“分离人声背景声”可以改善。
  4. VAD参数:在高级选项→语音识别参数中,合理设置语音阈值最长语音持续秒数静音分割持续毫秒等,能减少乱切和无效识别。
  5. 是否使用LLM重新断句:将识别文本发给AI修正错别字、重新断句,可提升最终字幕的流畅度(但效果取决于所用AI模型的质量)。

在确保准确性的前提下提速,您可以这样操作:

  • 将语音识别模型设为 large-v3(准确性最高),同时强制关闭GPU检测(在params.json中设置is_cuda: false),然后适当调高CPU同时任务数(如8~16)。这样可以让纯CPU以多线程方式运行large-v3,速度虽不及GPU但准确性最好。
  • 如果GPU无法启用且CPU性能不足,可退一步选择 medium 模型,兼顾速度和准确性。

总结:模型精度直接对应文字准确性,而影响准确性的核心是模型大小和音频清晰度。在您的场景下,推荐使用 large-v3 + CPU多线程 的平衡方案。

large-v3 与 large-v3-turbo的差别

large-v3 是原始的全尺寸模型,精度最高但显存和计算要求也最高(建议显存 ≥ 10GB)。large-v3-turbo 是经过蒸馏/量化优化的版本,体积更小、推理速度更快,但精度略有下降。两者的关系:turbo 版本通常速度提升 2~4 倍,显存占用降低 30%~50%,适用于显存不足或希望更快处理的场景。如果您追求极致准确性且硬件允许(特别是 GPU 可用时),选 large-v3;如果希望在 CPU 上加快速度或显存有限,large-v3-turbo 是更好的平衡选择。在您当前无法启用 GPU 的情况下,建议使用 large-v3-turbo + CPU多线程,既能获得接近 large-v3 的准确性,又能大幅缩短等待时间。关于 faster-whisper 模型详细说明,请查阅相关文档:faster-whisper本地渠道


Application started at 2026-06-09 20:19:50

[DEBUG] 上次缓存的角色:No,字幕嵌入类型:1,发音语言:en,目标语言:zh-cn,目标语言代码:None,模型:large-v3-turbo,TTS渠道[0]
[DEBUG] NVIDIA_GPU_NUMS=1
[DEBUG] Found 1 GPUs, cost=2s
[DEBUG] process_max_gpu=1,is_multi_gpus=False
[DEBUG] Concurrent task_nums=1, process_max_cpu=5
[DEBUG] start 9 jobs
[DEBUG] 返回缓存的编解码器 Windows-264: h264_nvenc
[DEBUG] 返回缓存的编解码器 Windows-265: hevc_nvenc
[WARNING] 无法连接 huggingface.co, 使用镜像替换: hf-mirror.com
HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(, 'Connection to huggingface.co timed out. (connect timeout=3)'))

Logging error

Traceback (most recent call last):
File "urllib3\connection.py", line 198, in _new_conn
File "urllib3\util\connection.py", line 85, in create_connection
File "urllib3\util\connection.py", line 73, in create_connection
TimeoutError: timed out

The above exception was the direct cause of the following exception:

Tracebac
......
en', target_sub='E:/short/zip/半江瑟瑟半江红/subtitles/13-mp4/en.srt', target_wav='E:/short/app/win-pyvideotrans-v4.01-0602/tmp/42424/fc46a6e97e/target.wav', target_wav_output='E:/short/zip/半江瑟瑟半江红/subtitles/13-mp4/en.m4a', translate_type=1, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='zh-cn', recogn_type=0, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='tiqu', subtitles='', targetdir_mp4='E:/short/zip/半江瑟瑟半江红/subtitles/13-mp4/13.mp4', novoice_mp4='E:/short/app/win-pyvideotrans-v4.01-0602/tmp/42424/fc46a6e97e/novoice.mp4', is_separate=False, embed_bgm=True, instrument=None, vocal=None, clear_cache=True, background_music='', subtitle_type=0, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8)
[DEBUG] The file info after process:result={'video_fps': 25.0, 'r_frame_rate': '25/1', 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 608, 'height': 1080, 'time': 86200, 'streams_len': 3, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}

[DEBUG] 开始语音识别:渠道0
[DEBUG] The file info after process:result={'video_fps': 25.0, 'r_frame_rate': '25/1', 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 608, 'height': 1080, 'time': 98560, 'streams_len': 3, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}

[DEBUG] The file info after process:result={'video_fps': 24.0, 'r_frame_rate': '24/1', 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 608, 'height': 1080, 'time': 85583, 'streams_len': 3, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}

[DEBUG] [新进程任务 开始:STT use large-v3-turbo]
[DEBUG] 任务参数:kwargs={'detect_language': 'zh-cn', 'model_name': 'large-v3-turbo', 'logs_file': 'E:/short/app/win-pyvideotrans-v4.01-0602/tmp/42424/18572ffef8/faster-zh-cn-1781007691.5113764.log', 'is_cuda': True, 'no_speech_threshold': 0.6, 'condition_on_previous_text': False, 'speech_timestamps': None, 'audio_file': 'E:/short/app/win-pyvideotrans-v4.01-0602/tmp/42424/18572ffef8/zh-cn.wav', 'local_dir': 'E:/short/app/win-pyvideotrans-v4.01-0602/models/models--mobiuslabsgmbh--faster-whisper-large-v3-turbo', 'compute_type': 'float32', 'jianfan': True, 'audio_duration': 86208, 'hotwords': '', 'prompt': '', 'beam_size': 5, 'best_of': 5, 'temperature': '', 'repetition_penalty': 1.0, 'compression_ratio_threshold': 2.4, 'max_speech_ms': 5000, 'device_index': 0}
[DEBUG] GPU进程池:max_workers=1
[DEBUG] [faster_whisper]加载模型:当前 is_cuda=True,_compute_type='float32'
[DEBUG] faster-whisper模式下,对large-v3-turbo模型返回的断句结果重新修正
[DEBUG] 断句结果重新修正完毕
[DEBUG] 返回识别结果 这是gpu突然就没有了。但是视频就卡在哪里不动了。可以看到这是什么问题吗

从日志看,软件在启动时检测到您的 NVIDIA 显卡,并认为 CUDA 环境可用(NVIDIA_GPU_NUMS=1),因此 is_cuda=True。虽然您在界面上没有勾选 CUDA 加速,但软件仍自动尝试使用 GPU 加载模型 large-v3-turbo(_compute_type='float32')。这正是导致卡住的原因——您的显卡显存或 CUDA 计算能力不足以支撑 float32 精度下的 large-v3-turbo 模型加载,导致模型加载超时或崩溃。直接原因:GPU 显存不足或 CUDA 版本/驱动不兼容,模型在 GPU 上无法正常初始化,程序卡死。解决方案:强制完全禁用 GPU 加速:打开软件根目录下的 videotrans/params.json 文件,找到 "is_cuda" 字段(约第 10 行附近),将其值改为 false,保存后重启软件。注意:不要在界面勾选 CUDA 加速,也不要在高级选项中设置 “多卡模式”。如果 params.json 中已经是 false,请检查是否有缓存覆盖,可删除 videotrans/ 目录下的 cfg.jsoncodec.json 文件后重启。切换为 CPU 模式后,适当优化 CPU 性能:在菜单 → 工具 → 高级选项 → 通用设置 中,将 CPU同时任务数[重启生效] 设为 CPU 核心数(如 8),并重启软件。将模型改为 smallbase,如果必须保持较高精度,仍可使用 large-v3-turbo,但 CPU 模式下会非常慢,建议酌情降低。如果希望将来能使用 GPU,请确认安装了 CUDA 12.8+ 和 cuDNN 9.11+,且显存 ≥ 8GB(推荐 10GB+)。

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. Dondate: ko-fi.com/jianchang512

Related resource