#8890 语音识别阶段出错[faster-whisper(内置)] unsupported device cuda:1,Traceback (most recent call last): File

120.239**9 Posted at: 15 hours ago

语音识别阶段出错[faster-whisper(内置)] unsupported device cuda:1,Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 73, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
ValueError: unsupported device cuda:1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 73, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
ValueError: unsupported device cuda:1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 103, in faster_whisper
File "videotrans\process\stt_faster.py", line 86, in _create_model
File "videotrans\process\stt_faster.py", line 96, in _create_model
File "videotrans\process\stt_faster.py", line 73, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
ValueError: unsupported device cuda:1

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 85, in run
File "videotrans\task\_stage_recogn.py", line 64, in recogn
File "videotrans\recognition\__init__.py", line 178, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_whisper.py", line 39, in _exec
File "videotrans\recognition\_whisper.py", line 141, in _faster
File "videotrans\configure\base.py", line 300, in _new_process
videotrans.configure.excepts.VideoTransError: unsupported device cuda:1,Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 73, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
ValueError: unsupported device cuda:1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 73, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
ValueError: unsupported device cuda:1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\stt_faster.py", line 103, in faster_whisper
File "videotrans\process\stt_faster.py", line 86, in _create_model
File "videotrans\process\stt_faster.py", line 96, in _create_model
File "videotrans\process\stt_faster.py", line 73, in _create_model
File "faster_whisper\transcribe.py", line 689, in init
ValueError: unsupported device cuda:1

trk=翻译视频 单视频模式
选择音视频文件: D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165/FC2PPV-3972175.mp4,
输出目录: D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165/_video_out/FC2PPV-3972175-mp4,
self.cfg.cache_folder='D:/pyvideotrans/tmp/22708/569fff24a4'
已选 清理已生成, 已选 启用硬件加速
语音识别:faster-whisper(内置), large-v3, 发音语言: 日语
最长语音持续(秒): 5s
最短语音持续(毫秒): 3000ms
静音分割持续毫秒: 600ms
语音阈值: 0.45
选择VAD: silero
计算数据类型:default
识别准确度beam_size:5
识别准确度best_of:5
启用上下文感知:False
重复惩罚:1.0
文本压缩率:2.4
翻译渠道:本地大模型(兼容OpenAI),发音语言:日语,目标语言:简体中文
已选 发送完整字幕, AI翻译渠道每批字幕行数:40
Dont dubbing: self.cfg.voice_role='No'
嵌入硬字幕(双)
中日韩字幕单行字符数:15, 其他语言字幕单行字符数:40
video duration:5276643ms
video information:{'video_fps': 29.97, 'r_frame_rate': 29.97, 'video_codec_name': 'hevc', 'audio_codec_name': 'aac', 'width': 2560, 'height': 1440, 'time': 5276643, 'streams_len': 3, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p10le'}
self.cfg=TaskCfgVTT(uuid='569fff24a4', name='D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165/FC2PPV-3972175.mp4', dirname='D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165', noextname='FC2PPV-3972175', basename='FC2PPV-3972175.mp4', ext='mp4', target_dir='D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165/_video_out/FC2PPV-3972175-mp4', cache_folder='D:/pyvideotrans/tmp/22708/569fff24a4', is_cuda=True, source_language='日语', source_language_code='ja', source_sub='D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165/_video_out/FC2PPV-3972175-mp4/ja.srt', source_wav='D:/pyvideotrans/tmp/22708/569fff24a4/ja.wav', source_wav_output='D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165/_video_out/FC2PPV-3972175-mp4/ja.m4a', target_language='简体中文', target_language_code='zh-cn', target_sub='D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165/_video_out/FC2PPV-3972175-mp4/zh-cn.srt', target_wav='D:/pyvideotrans/tmp/22708/569fff24a4/target.wav', target_wav_output='D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165/_video_out/FC2PPV-3972175-mp4/zh-cn.m4a', translate_type=9, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=True, video_autorate=True, remove_silent_mid=False, align_sub_audio=True, tts_model_name=None, detect_language='ja', recogn_type=0, model_name='large-v3', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='D:/Program Files (x86)/Steam/steamapps/workshop/content/431960/3501427165/_video_out/FC2PPV-3972175-mp4/FC2PPV-3972175.mp4', novoice_mp4='D:/pyvideotrans/tmp/22708/569fff24a4/novoice.mp4', is_separate=False, embed_bgm=True, instrument='D:/pyvideotrans/tmp/22708/569fff24a4/instrument.wav', vocal='D:/pyvideotrans/tmp/22708/569fff24a4/vocal.wav', clear_cache=True, background_music='', subtitle_type=3, only_out_mp4=False, recogn2pass=True, output_srt=1, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=5276643


=
system:Windows-10-10.0.26300-SP0
version:v4.19
frozen:True
language:zh_CN
root_dir:D:/pyvideotrans

1 Replies

#1 DeepSeek reply at 15 hours ago

这是 GPU 设备索引分配错误:软件枚举到了多块 GPU(或虚拟/核显),并把识别任务派发到了 cuda:1(第二块显卡),但该设备在 CUDA 运行库中不可用或驱动/cuDNN 不完整,因此 faster_whisper 初始化直接失败,两次重试均报同一错误。这与你选用的模型(large-v3)和视频本身无关。

按以下顺序处理:

  1. 限制 GPU 任务数为 1
    打开 菜单 → 工具/选项 → 高级选项 → 通用设置:

    • 将 GPU同时任务数[重启生效] 改为 1
    • 将 强制指定重型任务运行设备 恢复为默认(不要手动指定 cuda:1)
      保存后完全退出软件并重新启动。
  2. 屏蔽不可用的第二块显卡
    若你机器上除 NVIDIA 独显外还有核显、虚拟显卡或第二块未装好 CUDA 的卡,在 Windows「设备管理器 → 显示适配器」中禁用不参与运算的显卡;或在系统环境变量中新增 CUDA_VISIBLE_DEVICES = 0,重启软件,使程序只能看到索引 0 的那块卡。
  3. 检查 CUDA 环境
    确认已安装 NVIDIA 最新驱动 + CUDA 12.8 + cuDNN 9.x,且 cuDNN 的 bin 与 lib 目录已加入系统 PATH。仅安装 CUDA 工具包而缺少 cuDNN,也会导致某块卡无法被识别为可用设备。
  4. 验证是否为环境问题
    临时取消勾选主界面的 启用硬件加速(CUDA),用 CPU 跑一次识别。若 CPU 正常而 GPU 报错,则确认是 CUDA/cuDNN 或多卡索引问题,而非软件或视频问题。
    另外可在 高级选项 → 语音识别参数 将 计算数据类型 改为 float16(GPU 首选)或 int8(最省显存)。

补充提醒:你的视频位于 D:/Program Files (x86)/Steam/... 这类含空格、括号且层级很深的路径,即使本次识别问题解决,后续 ffmpeg 合成阶段也容易因路径长度/特殊字符报错。建议先把视频复制到 D:/video/1.mp4 这类浅层纯英文数字路径后再翻译,并勾选 清理已生成 重试。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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 via ko-fi.com

Related resource