#1075 Error when connect Chatterbox TTS

2001:ee0* Posted at: 3 days ago 👁60

Hello admin,
When I connect to the latest version of Chatterbox that the author updated (which has added other languages besides English and Chinese), this error appears.
I have tried connecting with both versions 3.81 and 3.82, but the situation still encounters this error.
I really hope you can take the time to investigate and respond.
Thank you for creating such a wonderful software.


requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://127.0.0.1:5093/v2/audio/speech_with_prompt
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 267, 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


=
system:Windows-10-10.0.19045-SP0
version:v3.82
frozen:True
language:en
root_dir:F:/08_Pyvideo/win-videotrans-v3.82

12 Replies

The error indicates that the Chatterbox TTS service running at http://127.0.0.1:5093 is returning an internal server error (HTTP 500). This is an issue with the Chatterbox server itself, not with pyVideoTrans.

Here are the steps to troubleshoot:

  1. Verify Chatterbox Server Status: Ensure the Chatterbox TTS server is running correctly on your local machine. Check its console or logs for any error messages that explain the 500 error.
  2. Test the Chatterbox API Directly: Open a tool like curl or Postman and send a test request to the endpoint to confirm it's working.
    Example curl command structure (adjust the JSON body as needed for your Chatterbox setup):

    curl -X POST "http://127.0.0.1:5093/v2/audio/speech_with_prompt" -H "Content-Type: application/json" -d "{\"text\": \"Hello\", \"language\": \"en\"}"
  3. Check pyVideoTrans Configuration: In the software, go to Menu -> TTS Voice Settings. Ensure the "Chatterbox" voice role you have selected is valid and supported by your running Chatterbox server, especially with the new multi-language update.
  4. Review Chatterbox Documentation: Consult the latest documentation or release notes for the Chatterbox TTS project for any specific configuration requirements or known issues with the /v2/audio/speech_with_prompt endpoint.

Since this is a server-side error, the solution must be implemented on the Chatterbox TTS server side. If the server logs don't provide clarity, you may need to seek support from the Chatterbox TTS project maintainers.

I can't see the specific error, I need to take a screenshot of the chatterbox terminal error information when reporting the error

image
When i click testing it show errors

根据截图显示,Chatterbox服务器在启动时出现了错误。错误信息表明在加载模型时出现问题:"Error loading model from [models--microsoft--SpeechT5_tts]",具体是"OSError: [models--microsoft--SpeechT5_tts] does not appear to have a file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack"。

这表明Chatterbox无法找到必要的模型文件。请按以下步骤解决:

  1. 检查模型下载:Chatterbox需要下载Microsoft SpeechT5模型文件。确保:

    • 网络连接正常,能够访问Hugging Face
    • 有足够的磁盘空间(模型文件通常较大)
  2. 手动下载模型:如果自动下载失败,可以尝试:

  3. 重启Chatterbox服务:在解决模型文件问题后,完全重启Chatterbox服务,然后重新在pyVideoTrans中进行测试。
  4. 检查Chatterbox配置:确认Chatterbox的配置文件是否正确设置了模型路径和相关参数。

由于这是Chatterbox服务本身的问题,您可能需要查阅Chatterbox项目的文档或向其开发者寻求进一步的帮助来解决模型加载问题。

chatterbox中下载使用最新的 app.py

https://github.com/jianchang512/chatterbox-api

Thank you sincerely.

After downloading the app.py file and replacing this file in the chatterbox_TTs installation folder, I have tested and successfully connected with pyvideotrans version 3.82.

However, when using the Batch Dubbing for Subtitles feature, I tried selecting a Japanese subtitle file (srt), with the input sample audio also in Japanese (under 10s), but the software reported an error as follows:

Pyvideotrans:
Error during dubbing:[ChatterBox TTS] 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\task\job.py", line 185, in run
File "videotrans\task\_dubbing.py", line 47, in dubbing
File "videotrans\task\_dubbing.py", line 186, in _tts
File "videotrans\tts\__init__.py", line 267, in run
File "videotrans\tts\_base.py", line 193, 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

Screen CMD chatterbox tts

WARNING:root:Reference mel length is not equal to 2 * reference token length.

WARNING:root:Reference mel length is not equal to 2 * reference token length.

WARNING:root:Reference mel length is not equal to 2 * reference token length.

WARNING:root:Reference mel length is not equal to 2 * reference token length.

Sampling: 0%| | 0/1000 [00:00

根据错误信息和Chatterbox终端的警告信息,问题出现在Chatterbox TTS服务处理日语文本时。警告信息"Reference mel length is not equal to 2 * reference token length"表明语音克隆过程中存在音频特征不匹配的问题。

请按以下步骤排查:

  1. 检查参考音频质量

    • 确保参考音频是清晰的日语语音,没有背景噪音
    • 参考音频时长应在3-10秒之间,包含完整的短语或句子
    • 音频采样率应为16kHz或更高
  2. 验证日语支持

    • 确认Chatterbox支持日语语音克隆功能
    • 检查Chatterbox的日志中是否有关于日语语言模型的错误信息
  3. 测试简单文本

    • 先用简单的日语短语测试,避免复杂的句子结构
    • 确保字幕文件中的日语文本格式正确,没有特殊字符
  4. 检查Chatterbox配置

    • 确认Chatterbox使用的是支持多语言的模型
    • 查看是否有针对日语的特殊配置要求
  5. 提供Chatterbox完整错误日志

    • 当错误发生时,请提供Chatterbox终端中完整的错误堆栈信息,而不仅仅是警告信息

由于这是Chatterbox服务在处理特定语言时出现的问题,您可能需要向Chatterbox项目的开发者报告此问题,特别是关于日语语音克隆的功能。

First use the webui interface that comes with chatterbox-api to test the Japanese dubbing you made to see if there is an error. If there is an error, it should be a problem with the chatterbox model.

image
This is the result when I ran Chatterbox TTS on the WebUI and successfully generated a Japanese audio clip with a cloned voice.

I sincerely hope you can take some time to look into this issue. Wishing you a pleasant evening!

既然Chatterbox WebUI能够成功生成日语克隆语音,说明Chatterbox服务本身是正常的。问题可能出现在pyVideoTrans与Chatterbox的交互参数上。请按以下步骤排查:

  1. 检查pyVideoTrans中的Chatterbox配置

    • 在菜单栏选择 TTS配音设置
    • 确保选择的Chatterbox语音角色与WebUI中测试成功的角色一致
    • 确认语言设置正确设置为日语
  2. 调整高级选项

    • 在菜单栏选择 工具/选项 -> 高级选项
    • 在"配音调整"区域,尝试将"同时配音字幕数"改为 1
    • 将"配音后暂停时间/秒"适当增加(如设为 3
  3. 测试简单字幕

    • 创建一个只包含1-2行简单日语文本的SRT文件进行测试
    • 确保字幕文本格式与WebUI中测试成功的文本类似
  4. 检查网络连接

    • 确保pyVideoTrans能够稳定连接到本地的Chatterbox服务(127.0.0.1:5093)

如果问题仍然存在,请提供pyVideoTrans的完整日志文件(位于 F:/08_Pyvideo/win-videotrans-v3.82/logs/ 目录下),特别是错误发生时的详细日志信息。

The test is fine. Maybe there is a problem with your environment configuration. Re-download the new app.py, and then install the pydub soundfile modules and try again.

runtime\python -m pip install soundfile pydub

Sincere thanks to you.
I’m currently using your Kokoro-TTS, though I had to make some adjustments since Japanese requires installing some additional libraries.
Among the voice-over tools, Chatterbox TTS is truly impressive in terms of both speed and voice cloning quality.

Sincere thanks once again.

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