#4034 处理数据时缺少必需的键:'emo_control_method': Traceback (most recent call last): File "videotrans\tts\_f5tts.py", line 188, in _it

91.243* Posted at: 4 hours ago 👁11

处理数据时缺少必需的键:'emo_control_method':
Traceback (most recent call last):
File "videotrans\tts\_f5tts.py", line 188, in _item_task_index
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 emo_ref_path is not a valid key-word argument. Please click on 'view API' in the footer of the Gradio app to see usage.

During handling of the above exception, another exception occurred:

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 335, in _run
File "videotrans\tts\_f5tts.py", line 190, in _item_task_index
KeyError: 'emo_control_method'


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

1 Replies

这是由于您使用的 F5-TTS API 服务版本与 pyVideoTrans v3.98 内置的调用参数不兼容导致的。错误表明 API 不接受 emo_ref_path 参数,并导致后续缺少 emo_control_method 键。

解决方案:

  1. 确认 F5-TTS 服务版本:请检查您本地部署的 F5-TTS 项目版本。pyVideoTrans v3.98 设计用于兼容 F5-TTS v1 版本的 API。如果您部署的是 F5-TTS v2 或更新版本,其 API 接口可能已发生变化。
  2. 切换为兼容版本

    • 建议使用与软件兼容的 F5-TTS v1 版本。您可以参考知识库中的部署教程重新部署。
    • 或者,在 pyVideoTrans 中暂时更换为其他配音渠道(如 Edge-TTS、Qwen-TTS 本地版)来完成当前任务。
  3. 检查 API 地址配置:在 pyVideoTrans 的 菜单 -> 配音设置 -> F5-TTS 中,确保填写的 API 地址(例如 http://127.0.0.1:7860)正确,并且对应的 F5-TTS 服务正在运行。
  4. 查看 API 文档:按照错误提示,在您运行的 F5-TTS WebUI 页面底部点击 “view API”,查看当前版本 API 所接受的正确参数列表,以确认接口是否已变更。

请查阅相关文档:

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