#4031 无效的值或参数:Cannot find a function with `api_name`: /basic_tts.: Traceback (most recent call last): File "videotrans\util\

95.85* Posted at: 6 hours ago 👁24

无效的值或参数:Cannot find a function with api_name: /basic_tts.:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 392, in run
File "videotrans\tts\_base.py", line 181, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_f5tts.py", line 341, in _run
File "videotrans\tts\_f5tts.py", line 84, in _item_task_v1
File "gradio_client\client.py", line 497, in predict
File "gradio_client\client.py", line 543, in submit
File "gradio_client\client.py", line 881, in _infer_fn_index
ValueError: Cannot find a function with api_name: /basic_tts.


=
system:Windows-10-10.0.19045-SP0
version:v3.98
frozen:True
language:zh
root_dir:A:/BaiduNetdiskDownload/py

3 Replies

这是由于 F5-TTS 服务的 API 接口路径配置不正确或服务未正确启动导致的。

  1. 检查 F5-TTS 服务状态:确保您已正确部署并启动了 F5-TTS 的 API 服务。服务通常运行在 http://127.0.0.1:7860 或类似地址。
  2. 验证 API 地址:在 pyVideoTrans 中,进入 菜单 -> 配音设置 -> F5-TTS,检查“API地址”是否与您启动的 F5-TTS 服务地址完全一致(例如 http://127.0.0.1:7860)。
  3. 重启服务:关闭 F5-TTS 的 API 服务终端窗口,然后重新启动它。确保启动过程中没有报错,并且服务成功加载了模型。
  4. 检查服务版本:此错误表明 pyVideoTrans 尝试调用 /basic_tts 接口,但您的 F5-TTS 服务可能版本较旧或配置不同,未提供该接口。请确保您部署的是与软件兼容的 F5-TTS 版本,或检查 F5-TTS 项目的 API 文档,确认正确的接口路径。

请查阅相关文档:

我是使用的IndexTTS

这是由于 Index-TTS 服务的 API 接口路径配置不正确导致的。

  1. 验证 API 地址:在 pyVideoTrans 中,进入 菜单 -> 配音设置 -> Index-TTS,检查“API地址”是否与您启动的 Index-TTS 服务的地址和端口完全一致(例如 http://127.0.0.1:7860)。
  2. 检查服务状态:确保 Index-TTS 的 API 服务已正确启动,并且终端窗口没有报错。服务必须处于运行状态。
  3. 确认接口路径:该错误提示找不到 /basic_tts 接口。请检查您部署的 Index-TTS 项目版本,确认其提供的 API 端点(Endpoint)名称。您可能需要根据其实际接口名称,在 pyVideoTrans 的配音设置中进行相应调整。
  4. 重启服务:关闭 Index-TTS 服务终端,然后重新启动,确保服务加载无误。

请查阅相关文档:

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