#3100 KeyError: 'emo_control_method'

2408:8266* Posted at: 20 hours ago 👁14

处理数据时缺少必需的键:'emo_control_method':
Traceback (most recent call last):
File "videotrans\tts\_f5tts.py", line 190, in _item_task_index
File "gradio_client\client.py", line 496, in predict
File "gradio_client\client.py", line 542, in submit
File "gradio_client\client.py", line 876, in _infer_fn_index
ValueError: Cannot find a function with api_name: /gen_single.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 17, in run
File "videotrans\tts\__init__.py", line 359, in run
File "videotrans\tts\_base.py", line 176, 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 192, in _item_task_index
KeyError: 'emo_control_method'


=
system:Windows-10-10.0.19045-SP0
version:v3.96
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v3.96-24

1 Replies

该错误是由于在调用 F5-TTS 的 API 接口时,发送的请求参数缺少了 emo_control_method 键导致的。这通常是因为 pyVideoTrans 软件版本与您部署的 F5-TTS API 服务版本不兼容。

解决方案:

  1. 检查并更新 F5-TTS 服务:确保您启动的 F5-TTS 项目是最新版本。旧版本的 F5-TTS API 接口可能与 pyVideoTrans v3.96 不匹配。请前往 F5-TTS 官方仓库获取最新代码并重新部署。
  2. 检查 API 地址:在 pyVideoTrans 的“菜单”->“TTS设置”->“F5-TTS”中,确认“API地址”配置正确(通常为 http://127.0.0.1:7860),并且该服务正在运行且未被关闭。
  3. 临时解决方案(如果更新服务无效):您可以尝试在 pyVideoTrans 中切换到其他 TTS 渠道(如 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