#3971 TypeError: Parameter `text_input` is not a valid key-word argument. Please click on 'view API' in the footer of the Grad

119.123* Posted at: 3 hours ago 👁7

程序内部错误:Parameter text_input is not a valid key-word argument. Please click on 'view API' in the footer of the Gradio app to see usage.:
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 317, in _run
File "videotrans\tts\_f5tts.py", line 230, in _item_task_voxcpm
File "gradio_client\client.py", line 497, in predict
File "gradio_client\client.py", line 548, in submit
File "gradio_client\utils.py", line 1286, in construct_args
TypeError: Parameter text_input is not a valid key-word argument. Please click on 'view API' in the footer of the Gradio app to see usage.


=
system:Windows-10-10.0.19045-SP0
version:v3.98
frozen:True
language:zh
root_dir:G:/VideoTrans

1 Replies

这是由于 F5-TTS 服务的 API 接口参数不匹配导致的错误。F5-TTS 服务端的 API 接口已更新,但客户端(pyVideoTrans)发送的参数名称(text_input)与服务器期望的参数名称不一致。

解决方案:

  1. 更新 F5-TTS 服务端:请确保你本地部署的 F5-TTS 项目是最新版本。前往 F5-TTS 项目仓库(例如 https://github.com 上的相关项目),拉取最新代码并重启其 API 服务。
  2. 检查 API 地址:在 pyVideoTrans 的 菜单 -> 配音设置 -> F5-TTS 设置 中,确认你填写的 API 地址(例如 http://127.0.0.1:7860)正确无误,并且该服务正在运行。
  3. 查看 API 文档:在 F5-TTS 服务启动后,打开其 WebUI 页面(通常是 http://127.0.0.1:7860),滚动到页面底部,点击 “view API” 链接,查看当前服务端期望的参数名称(例如可能是 text 而非 text_input)。
  4. 临时切换渠道:在问题解决前,可以暂时使用其他配音渠道(如 Edge-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