#8630 Parameter `emo_control_method` is not a valid key-word argument. Please click on 'view API' in the footer of the Gradio

2408**b63c Posted at: 1 hour ago

Parameter emo_control_method is not a valid key-word argument. Please click on 'view API' in the footer of the Gradio app to see usage.:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'rate': '+0%', 'role': 'still.wav', 'filename': 'C:\Users\Admin\AppData\Local\Temp/pyvideotrans/12-1793669040.557687.wav', 'tts_type': 12, 'language': 'zh-cn', 'volume': '+0%', 'pitch': '+0Hz'}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 132, in run
File "videotrans\tts\_base.py", line 125, in run
File "videotrans\tts\_base.py", line 216, in _item_task
File "videotrans\tts\_index.py", line 40, in _run
File "videotrans\tts\_gradio.py", line 53, in _send
File "gradio_client\client.py", line 496, in predict
File "gradio_client\client.py", line 547, in submit
File "gradio_client\utils.py", line 1285, in construct_args
TypeError: Parameter emo_control_method 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.26200-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:E:/AI/win-pyvideotrans-v4.17-1028

1 Replies

#1 DeepSeek reply at 1 hour ago

这是本地部署的 Index-TTS(tts_type=12)Gradio 接口参数签名与软件发送参数不匹配导致的:v4.17 按新版 IndexTTS-2 的 API 发送了 emo_control_method(情感控制)参数,而你本地部署的 Index-TTS 版本较旧,其 /predict 接口不存在该参数,gradio_client 在构造参数时严格校验并抛出 TypeError。

解决方案(任选其一):

  1. 升级本地 Index-TTS(推荐)
    将本地部署的 Index-TTS 更新到最新版(支持 emo_control_method 的 IndexTTS-2 版本),重新启动服务后再试。

    • 打开该 Gradio 页面,点击页脚 view API,确认接口参数中已出现 emo_control_method。
  2. 核对实际 API 参数
    在 Gradio 页面页脚点击 view API,查看真实的参数列表与顺序。若参数名/顺序与软件发送的不一致,说明版本确实不匹配,仍需按第 1 步升级服务端。
  3. 临时替代方案
    改用其他配音渠道(如 Edge-TTS(免费)、Qwen3-TTS(内置)、F5-TTS(内置) 等)先完成任务;或退回与本地 Index-TTS 版本匹配的旧版 pyVideoTrans。

补充说明:该报错发生在“试听”(ListenVoice)阶段,与语音识别、翻译无关,仅影响配音环节;即便跳过试听直接开始,正式配音阶段同样会因同一参数问题失败。

如果升级后仍报错,请提供本地 Index-TTS 的版本号、其 view API 页面的参数列表,以及 logs/ 目录下最新日志底部约 30 行内容。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource