#3059 Traceback (most recent call last): File "pyimod03_ctypes.py", line 77, in init File "ctypes\__init__.py", line 374, in

240e:3bb* Posted at: 17 hours ago 👁24

Traceback (most recent call last):
File "pyimod03_ctypes.py", line 77, in init
File "ctypes\__init__.py", line 374, in init
FileNotFoundError: Could not find module 'D:\videotrans\_internal\azure\cognitiveservices\speech\Microsoft.CognitiveServices.Speech.core.dll' (or one of its dependencies). Try using the full path with constructor syntax.

7 Replies

这是由于 Windows 预打包版软件在解压或运行时,内部依赖的 Azure Speech SDK 动态链接库(DLL)文件丢失或路径错误导致的。

解决方案

  1. 重新下载并完整解压:确保从官方渠道下载完整的 .7z 压缩包(非补丁包),并将其解压到一个路径中不含中文、空格或特殊符号的目录(例如 D:\pyVideoTrans)。
  2. 检查解压完整性:解压后,确认 _internal\azure\cognitiveservices\speech\ 目录下存在 Microsoft.CognitiveServices.Speech.core.dll 文件。如果缺失,说明下载或解压过程出错,请重新下载。
  3. 避免在压缩包内运行严禁直接在 .7z 压缩包内双击 sp.exe 运行。必须先将整个压缩包解压到硬盘目录。
  4. 避免权限问题:不要将软件解压到 C:\Program Files 等需要管理员权限的系统目录,这可能导致文件访问异常。

如果问题依旧,请提供软件安装目录下 logs/ 文件夹中最新日志文件的底部约30行内容以便进一步分析。


Application started at 2026-02-03 15:44:41

!!! UNHANDLED EXCEPTION !!!
Traceback (most recent call last):
File "pyimod03_ctypes.py", line 77, in init
File "ctypes\__init__.py", line 374, in init
FileNotFoundError: Could not find module 'D:\videotrans\_internal\azure\cognitiveservices\speech\Microsoft.CognitiveServices.Speech.core.dll' (or one of its dependencies). Try using the full path with constructor syntax.

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

Traceback (most recent call last):
File "videotrans\mainwin\_main_win.py", line 333, in _set_default
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 "videotrans\tts\__init__.py", line 9, 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 "videotrans\tts\_azuretts.py", line 5, 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 "azure\cognitiveservices\speech\__init__.py", line 8, 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 "azure\cognitiveservices\speech\speech.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 "azure\cognitiveservices\speech\interop.py", line 20, in
File "ctypes\__init__.py", line 452, in LoadLibrary
File "pyimod03_ctypes.py", line 79, in init
pyimod03_ctypes.install..PyInstallerImportError: Failed to load dynlib/dll 'D:\videotrans\_internal\azure\cognitiveservices\speech\Microsoft.CognitiveServices.Speech.core.dll'. Most likely this dynlib/dll was not found when the application was frozen.

这是由于软件打包时 Azure Speech SDK 的动态链接库文件缺失或路径解析错误导致的。该问题通常发生在使用了不完整的安装包或解压过程出错时。

解决方案:

  1. 重新下载完整包:请确保从官方渠道下载的是 完整版 .7z 压缩包(文件名通常包含 full 或类似标识),而不是仅包含更新文件的补丁包。
  2. 彻底删除旧文件:完全删除当前的 D:\videotrans 文件夹。
  3. 重新解压到正确路径

    • 将下载的完整 .7z 压缩包解压到一个新的、路径简单的目录。强烈建议使用纯英文路径,例如 D:\pyVideoTrans
    • 严禁在压缩包内直接运行 sp.exe,也不要解压到 C:\Program Files 等需要管理员权限或路径包含空格的目录。
  4. 验证文件完整性:解压后,请导航到 _internal\azure\cognitiveservices\speech\ 目录下,确认 Microsoft.CognitiveServices.Speech.core.dll 文件确实存在。
  5. 首次启动:双击新解压目录下的 sp.exe 启动软件。

如果按照以上步骤操作后问题依旧,可能是下载的安装包本身损坏,请尝试重新下载。

请查阅相关文档:

完全按照指示的方法操作,也重新下载了,但是同样问题依旧存在

根据现有文档无法确定具体原因。请提供软件安装目录下的 logs/ 文件夹中最新的日志文件(复制底部约30行报错信息)以便分析。


Application started at 2026-02-03 15:59:53

!!! UNHANDLED EXCEPTION !!!
Traceback (most recent call last):
File "pyimod03_ctypes.py", line 77, in init
File "ctypes\__init__.py", line 374, in init
FileNotFoundError: Could not find module 'D:\Pyvideotrans\_internal\azure\cognitiveservices\speech\Microsoft.CognitiveServices.Speech.core.dll' (or one of its dependencies). Try using the full path with constructor syntax.

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

Traceback (most recent call last):
File "videotrans\mainwin\_main_win.py", line 333, in _set_default
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 "videotrans\tts\__init__.py", line 9, 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 "videotrans\tts\_azuretts.py", line 5, 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 "azure\cognitiveservices\speech\__init__.py", line 8, 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 "azure\cognitiveservices\speech\speech.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 "azure\cognitiveservices\speech\interop.py", line 20, in
File "ctypes\__init__.py", line 452, in LoadLibrary
File "pyimod03_ctypes.py", line 79, in init
pyimod03_ctypes.install..PyInstallerImportError: Failed to load dynlib/dll 'D:\Pyvideotrans\_internal\azure\cognitiveservices\speech\Microsoft.CognitiveServices.Speech.core.dll'. Most likely this dynlib/dll was not found when the application was frozen.

这是由于软件打包的 Azure Speech SDK 组件在您当前的 Windows 系统环境下无法正确加载其依赖项。虽然文件存在,但可能缺少系统级的运行时库(如 VC++ Redistributable)。解决方案:安装 Visual C++ 运行库:请访问微软官网,下载并安装最新版本的 Microsoft Visual C++ Redistributable for Visual Studio。通常需要同时安装 x86 和 x64 版本。检查系统安全软件:暂时禁用 Windows Defender 实时保护或其他第三方杀毒软件,然后尝试重新运行 sp.exe,以排除安全软件拦截或误删 DLL 文件的可能性。尝试使用源码部署(替代方案):如果上述方法无效,可以放弃预打包版,改为在您的 Windows 系统上使用源码部署方式运行。这需要安装 Python 3.10、uv 包管理器和 FFmpeg,然后通过 git clone 获取源码并运行。请查阅相关文档:安装 Visual Studio Community 免费版,解决pip安装失败问题

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