#1020 Help Needed: GPU Support Installation Error for Chatterbox TTS in Pyvideotrans

14.181* Posted at: 1 day ago 👁23

Recently, the author of Pyvideotrans released the Chatterbox TTS multilanguage version on GitHub. I have downloaded and installed it following the instructions.
After successfully completing the installation with the "启动服务.bat" (Start Service.bat) file, I proceeded to run the "安装N卡GPU支持.bat" (Install NVIDIA GPU Support.bat) file, but it displayed an error on the screen.
I would greatly appreciate your help in fixing this issue and integrating it into Pyvideotrans. Thank you very much for your assistance.


WARNING: Skipping torchaudio as it is not installed.
ERROR: Exception:
Traceback (most recent call last):
File "F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime.\Lib\site-packages\pip\_internal\cli\base_command.py",
line 167, in exc_logging_wrapper

status = run_func(*args)

File "F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime.\Lib\site-packages\pip\_internal\cli\req_command.py",
line 205, in wrapper

return func(self, options, args)

File "F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime.\Lib\site-packages\pip\_internal\commands\install.py",
line 324, in run

resolver = self.make_resolver(

File "F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime.\Lib\site-packages\pip\_internal\cli\req_command.py",
line 357, in make_resolver

import pip._internal.resolution.resolvelib.resolver

File "F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime.\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 7, in

from pip._vendor.resolvelib import BaseReporter, ResolutionImpossible

File "F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime.\Lib\site-packages\pip\_vendor\resolvelib\__init__.py", line 1, in

from .resolvers import *

File "F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime.\Lib\site-packages\pip\_vendor\resolvelib\resolvers\__init__.py", line 1, in

from .structs import RequirementInformation

ImportError: cannot import name 'RequirementInformation' from 'pip._vendor.resolvelib.structs' (F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime.\Lib\site-packages\pip\_vendor\resolvelib\structs.py)


4 Replies

本条内容由 gpt-5-mini 回复

问题初步判断:错误信息说明嵌入的 pip 包(pip._vendor.resolvelib)与当前运行的 pip/环境不兼容,导致导入失败(缺少 RequirementInformation)。这通常发生在“打包 runtime”内置 Python 环境的 pip 被损坏或与脚本期望的 pip 版本不匹配。解决思路是修复/升级该 runtime 中的 pip,或使用干净的虚拟环境重新安装 GPU 支持。

请按下列步骤排查并修复:

  1. 确认正在使用的 Python / pip(在报错的 runtime 环境下执行)

    • 以报告中路径为例,在命令行执行(将路径替换为你的实际路径):
      F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime\Scripts\python.exe -V
      F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime\Scripts\python.exe -m pip --version
    • 把这两条输出贴上来(如果后续仍有问题,我需要这些信息)。
  2. 尝试在该 runtime 中升级/修复 pip

    • 在同一环境中运行:
      F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime\Scripts\python.exe -m pip install --upgrade pip setuptools wheel
    • 如果 upgrade 也报同样错误,尝试先用 ensurepip 重建 pip:
      F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime\Scripts\python.exe -m ensurepip --upgrade
      然后再执行上面的 pip upgrade 命令。
  3. 如果 pip 仍然报错,建议在系统 Python 或新虚拟环境中重试(规避嵌入 runtime 的不兼容问题)

    • 在任意位置创建新的虚拟环境(示例):
      python -m venv C:\temp\chatterbox-env
      C:\temp\chatterbox-env\Scripts\activate
      python -m pip install --upgrade pip setuptools wheel
    • 然后在该虚拟环境中运行 Chatterbox 的 GPU 安装脚本或手动安装依赖。
  4. 关于 torchaudio / CUDA / GPU 支持的注意事项

    • 日志已提示 “Skipping torchaudio as it is not installed”。如果要启用 GPU,需要安装与当前 torch 匹配的 torchaudio wheel(CUDA 版本需匹配)。在 pyVideoTrans Windows 预打包说明中,绑定的 torch 版本为 torch2.7.1+cu128;如果你使用相同的 CUDA 版本,务必安装与之匹配的 torchaudio(或使用与你的 torch/CUDA 版本一致的 PyTorch 提供的 whl)。
    • 如果你要在 Chatterbox 中启用 GPU,确保 NVIDIA 驱动与 CUDA 工具包兼容(若出现 cudaErrorNoKernelImageForDevice,参考 pyVideoTrans 常见问题,更新显卡驱动或安装/升级到 CUDA 12.x,或改用 CPU)。
  5. 常见补救(顺序尝试)

    • 用管理员权限打开 cmd 再运行“安装N卡GPU支持.bat”。
    • 在 runtime 目录下先修 pip(步骤2),再重试安装脚本。
    • 若安装脚本对 embedded runtime 做了大量修改,考虑改为在独立 venv 中部署 Chatterbox 并按其 README 手动安装依赖。
  6. 如果以上无法解决,请提供以下信息以便进一步定位(必须提供)

    • F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime\Scripts\python.exe -V 的输出
    • F:\05_Text_2_Speech\chatterbox-win-NoModels-1005\runtime\Scripts\python.exe -m pip --version 的输出
    • 完整的错误截图或完整 traceback(你已贴出一段,请确认是否为完整输出)
    • “安装N卡GPU支持.bat”的内容(把 .bat 文件文本粘贴上来)
    • 如果你希望集成到 pyVideoTrans,说明你希望如何调用 Chatterbox(直接替换 TTS 渠道还是作为可选服务),并提供 pyVideoTrans 的 logs(位于 pyVideoTrans 根目录下的 logs/,请上传最近的日志文件)。

如果在尝试上述修复时遇到新的错误,请把新的完整错误输出和上述信息贴上来,我会继续分析。

Admin

enter F:\05_Text_2_Speech\chatterbox-win-NoModels-1005 open cmd
and exec runtime\python runtime\get-pip.py

then 安装N卡GPU支持.bat

Thank you very much, admin, for helping me fix the GPU installation error in Chatterbox TTS.
I followed the instructions and successfully installed it.
However, when I connected this Chatterbox TTS Multilanguage to the latest version of pyvideotrans 3.81, an error occurred.
Among the text-to-speech models, I find that Chatterbox runs the fastest and best. I really hope you, admin, can take the time to improve the software and make it work with Chatterbox TTS Multilanguage


500 Server Error: INTERNAL SERVER ERROR for url: http://127.0.0.1:5093/v2/audio/speech_with_prompt:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 269, in run
File "videotrans\tts\_base.py", line 182, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_chatterbox.py", line 45, in _run
File "videotrans\tts\_chatterbox.py", line 101, in _item_task_clone
File "requests\models.py", line 1026, in raise_for_status
requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://127.0.0.1:5093/v2/audio/speech_with_prompt

这个错误表明 pyVideoTrans 成功连接到了 Chatterbox TTS 服务(127.0.0.1:5093),但 Chatterbox 服务端在处理请求时发生了内部错误(500 Server Error)。

请按以下步骤排查:

  1. 确认 Chatterbox 服务状态

    • 确保 Chatterbox TTS 服务正在运行,且端口 5093 未被占用
    • 检查 Chatterbox 服务日志,查看具体的错误信息
  2. 验证 Chatterbox API 端点

    • 在浏览器中访问 http://127.0.0.1:5093/v2/audio/speech_with_prompt 看是否返回错误
    • 或者使用 curl 测试:

      curl -X POST http://127.0.0.1:5093/v2/audio/speech_with_prompt \
           -H "Content-Type: application/json" \
           -d '{"text": "test", "prompt": "test"}'
  3. 检查 pyVideoTrans 中的 Chatterbox 配置

    • 在 TTS 配音设置中,确保:

      • 选择了正确的 Chatterbox 模型
      • 语言设置与 Chatterbox 支持的语言匹配
      • 其他参数设置合理
  4. 常见问题排查

    • 模型未加载:Chatterbox 可能没有正确加载所需的语音模型
    • 内存不足:GPU 内存或系统内存不足导致处理失败
    • 参数不兼容:pyVideoTrans 发送的参数格式与 Chatterbox API 不匹配
  5. 获取详细错误信息

    • 查看 Chatterbox 服务的控制台输出或日志文件
    • 检查是否有模型下载失败、内存溢出等具体错误

请先提供 Chatterbox 服务端的错误日志,这将帮助我们确定是模型加载问题、参数问题还是服务配置问题。

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