#1710 TaskCfg(cache_folder='E:/pyvideotrans-v3.86/tmp4696/speech2text', target_dir='e:/pyvideotrans-v3.86/output/recogn', remo

240e:b8f* Posted at: 7 days ago 👁30

语音识别阶段出错:[faster-whisper(本地)] 运行时错误:Traceback (most recent call last):
File "videotrans\process\_overall.py", line 93, in run
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 113, in run
File "videotrans\task\_speech2text.py", line 140, in recogn
File "videotrans\recognition\__init__.py", line 236, in run
File "videotrans\recognition\_base.py", line 78, in run
File "videotrans\recognition\_overall.py", line 193, in _exec
RuntimeError: Traceback (most recent call last):
File "videotrans\process\_overall.py", line 93, in run
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.

TaskCfg(cache_folder='E:/pyvideotrans-v3.86/tmp4696/speech2text', target_dir='e:/pyvideotrans-v3.86/output/recogn', remove_noise=True, is_separate=False, detect_language='en', subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code=None, source_sub=None, target_sub='e:/pyvideotrans-v3.86/output/recogn/Linx1.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='Linx1', shibie_audio='E:/pyvideotrans-v3.86/tmp4696/speech2text/removed_noise_1764590581.2808511.wav', targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=None, recogn_type=0, model_name='large-v3-turbo', split_type=0, voice_autorate=False, video_autorate=False, cuda=False, name='F:/Linx/Linx1.mp4', basename='Linx1.mp4', ext='mp4', dirname='F:/Linx', shound_del_name=None, uuid='4d47269eae', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, auto_fix=True)


=
system:Windows-10-10.0.19045-SP0
version:v3.86
frozen:True
language:zh
root_dir:E:/pyvideotrans-v3.86

1 Replies

错误信息显示您请求使用 float16 数据类型进行计算,但您的设备或后端不支持高效的 float16 计算。这通常发生在较旧的显卡或不支持半精度浮点运算的硬件上。

解决方案:

  1. 关闭 CUDA 加速(临时解决):

    • 在主界面第 6 行,取消勾选“CUDA加速”
    • 这将强制软件使用 CPU 进行识别,虽然速度较慢,但可以绕过显卡的 float16 支持问题。
  2. 修改 CUDA 数据类型(推荐):

    • 如果您的显卡确实支持 CUDA,但可能版本较旧,可以尝试更改为 float32
    • 进入菜单栏:工具/选项 -> 高级选项
    • “Faster/OpenAI/Whisper 语音识别微调” 区域,找到 “CUDA数据类型”
    • 将其从 float16int8 改为 float32
    • 修改后,可以重新勾选主界面的“CUDA加速”以尝试使用 GPU。
  3. 检查显卡驱动和 CUDA 版本:

    • 确保您的 NVIDIA 显卡驱动已更新到最新版本。
    • 如果问题持续,可能是 CUDA 工具包版本与 faster-whisper 不兼容。您可以尝试在高级选项中,将“CUDA数据类型”改为 int8 进行测试。

操作顺序建议: 首先尝试 方案1(关闭CUDA) 以确认问题是否解决。如果希望使用 GPU 加速,再尝试 方案2(改为float32)

如果以上方法均无效,请提供 E:/pyvideotrans-v3.86/logs/ 目录下的最新日志文件以便进一步分析。

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions