#3483 TaskCfgSTT(is_cuda=True, uuid='c3fa5d2da7', cache_folder='E:/win-videotrans-v3.92/tmp/29376/c3fa5d2da7', target_dir='c:/

219.71* Posted at: 5 hours ago 👁11

语音识别阶段出错 [openai-whisper(本地)] 程序内部错误:module 'llvmlite.binding' has no attribute 'get_host_cpu_name'
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "concurrent\futures\process.py", line 246, in _process_worker
File "videotrans\process\stt_fun.py", line 34, in openai_whisper
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "whisper\__init__.py", line 13, in
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "whisper\model.py", line 14, in
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "whisper\transcribe.py", line 21, in
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "pyimod02_importers.py", line 457, in exec_module
File "whisper\timing.py", line 7, in
File "E:\win-videotrans-v3.92\_internal umba\__init__.py", line 73, in

from numba.core import config

File "E:\win-videotrans-v3.92\_internal umba\core\config.py", line 585, in

_env_reloader = _EnvReloader()

File "E:\win-videotrans-v3.92\_internal umba\core\config.py", line 119, in init

self.reset()

File "E:\win-videotrans-v3.92\_internal umba\core\config.py", line 123, in reset

self.update(force=True)

File "E:\win-videotrans-v3.92\_internal umba\core\config.py", line 152, in update

self.process_environ(new_environ)

File "E:\win-videotrans-v3.92\_internal umba\core\config.py", line 389, in process_environ

ENABLE_AVX = _readenv("NUMBA_ENABLE_AVX", int, avx_default)

File "E:\win-videotrans-v3.92\_internal umba\core\config.py", line 183, in _readenv

return default() if callable(default) else default

File "E:\win-videotrans-v3.92\_internal umba\core\config.py", line 379, in avx_default

cpu_name = CPU_NAME or ll.get_host_cpu_name()

AttributeError: module 'llvmlite.binding' has no attribute 'get_host_cpu_name'
"""

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

Traceback (most recent call last):
File "videotrans\task\job.py", line 105, in run
File "videotrans\task\_speech2text.py", line 152, in recogn
File "videotrans\recognition\__init__.py", line 265, in run
File "videotrans\recognition\_base.py", line 143, in run
File "videotrans\recognition\_overall.py", line 31, in _exec
File "videotrans\recognition\_overall.py", line 73, in _openai
File "videotrans\configure\_base.py", line 284, in _new_process
File "concurrent\futures\_base.py", line 458, in result
File "concurrent\futures\_base.py", line 403, in __get_result
AttributeError: module 'llvmlite.binding' has no attribute 'get_host_cpu_name'
TaskCfgSTT(is_cuda=True, uuid='c3fa5d2da7', cache_folder='E:/win-videotrans-v3.92/tmp/29376/c3fa5d2da7', target_dir='c:/users/user/videos/pyvideotrans/recogn', source_language=None, source_language_code=None, source_sub=None, source_wav=None, source_wav_output=None, target_language=None, target_language_code=None, target_sub='c:/users/user/videos/pyvideotrans/recogn/SpyTug-Xia Celestial Jul-26-2024.srt', target_wav=None, target_wav_output=None, name='E:/DL/SpyTug-Xia Celestial Jul-26-2024.mp4', noextname='SpyTug-Xia Celestial Jul-26-2024', basename='SpyTug-Xia Celestial Jul-26-2024.mp4', ext='mp4', dirname='E:/DL', shound_del_name=None, detect_language='en', recogn_type=1, model_name='large-v3', shibie_audio='E:/win-videotrans-v3.92/tmp/29376/c3fa5d2da7/SpyTug-Xia Celestial Jul-26-2024-1772721782.8622065.wav', remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.97
frozen:True
language:zh
root_dir:E:/win-videotrans-v3.92

1 Replies

这是由于 llvmlite 库版本不兼容或损坏导致的,通常发生在使用预打包版(.exe)时,openai-whisper(本地) 语音识别渠道依赖的 numballvmlite 库与当前系统环境冲突。

解决方案:

  1. 切换语音识别渠道:这是最直接的解决方法。在“语音识别”行,将渠道从 openai-whisper(本地) 切换为 faster-whisper(本地)faster-whisperopenai-whisper 的优化版本,速度更快且通常能避免此类库依赖问题。
  2. 检查软件版本:确保你使用的是最新版本 v3.97。根据知识库,低于 v3.97 的版本遇到疑似 bug 时,升级可能已解决。你提供的日志显示版本为 v3.97,符合要求。
  3. 重新下载完整包:如果问题持续存在,且你使用的是 Windows 预打包版,请尝试重新从官方渠道下载完整的 .7z 压缩包(而非补丁包),并解压到非系统盘、路径无中文或特殊符号的新目录(如 D:\pyVideoTrans)中运行。这可以排除现有文件损坏的可能性。
  4. 使用源码部署:如果以上方法均无效,可以考虑在 macOS/Linux 上使用 uv 进行源码部署,或在 Windows 上使用 Miniconda 创建纯净的 Python 环境进行源码部署,以彻底规避预打包环境的库冲突。

最佳实践建议:
对于英语视频的语音识别,知识库推荐使用 faster-whisper(本地) large-v3 模型或 OpenAI 语音识别 API(付费)。鉴于你当前使用的是 openai-whisper(本地) 且遇到库错误,强烈建议直接切换到 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