#6032 Parameter `text` is not a valid key-word argument. Please click on 'view API' in the footer of the Gradio app to see usa

240e:39c* Posted at: 16 hours ago

Parameter text 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 "H:\pyvideotrans\videotrans\util\ListenVoice.py", line 21, in run

tts.run(

File "H:\pyvideotrans\videotrans\tts\__init__.py", line 207, in run

return _cls(**kwargs).run()  # type:ignore
       ^^^^^^^^^^^^^^^^^^^^

File "H:\pyvideotrans\videotrans\tts\_base.py", line 141, in run

raise self.error if isinstance(self.error, Exception) else DubbingSrtError(str(self.error))

videotrans.configure.excepts.DubbingSrtError: Parameter text 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.26100-SP0
version:v4.06
frozen:False
language:zh
root_dir:H:/pyvideotrans
Python: 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:24:49) [MSC v.1937 64 bit (AMD64)]

1 Replies

Parameter 'text' is not a valid key-word argument 错误表示你调用的某个 Gradio TTS 服务(如 GPT-SoVITS、F5-TTS、CosyVoice 等)不接受名为 text 的参数,而是期望其他参数名(如 promptinput 等)。

原因:该 TTS 渠道的 API 地址配置不正确,或选错了 API 版本(例如 GPT-SoVITS 的 v1 版 API 与 v2 版 API 参数不同)。

解决步骤

  1. 打开 菜单 → TTS 设置 → [你正在使用的 TTS 渠道],检查 API 地址是否正确,确保填写的是 API 地址(如 http://127.0.0.1:9880)而非 WebUI 地址(http://127.0.0.1:7860)。
  2. 如果是 GPT-SoVITS,确认是否勾选了 api_v2?:若你启动的是 api.py(v1),则不应勾选;若启动的是 api_v2.py,则必须勾选。
  3. 确认该 TTS 服务是否正常运行,并且版本与软件兼容(建议使用最新版本地服务)。
  4. 如果使用 F5-TTS、CosyVoice 等渠道,请确保其 Gradio 接口已正确启动,并查阅对应文档确认参数名称。

请查阅相关文档:

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.

Dondate via ko-fi.com

Dondate via PayPal

Related resource