#1069 gradio_client.exceptions.AppError: The upstream Gradio app has raised an exception: Value: false is not in the list of c

223.79* Posted at: 3 days ago 👁22

在调用copsyVoice2,测试的时候出现以下报错

无效的值或参数:The upstream Gradio app has raised an exception: Value: false is not in the list of choices: [False, True]:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 18, in run
File "videotrans\tts\__init__.py", line 254, in run
File "videotrans\tts\_base.py", line 182, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_cosyvoice.py", line 152, in _run
File "videotrans\tts\_cosyvoice.py", line 63, in _item_task_cosyvoice2
File "gradio_client\client.py", line 478, in predict

).result()

File "gradio_client\client.py", line 1539, in result

return super().result(timeout=timeout)

File "concurrent\futures\_base.py", line 446, in result
File "concurrent\futures\_base.py", line 391, in __get_result
File "concurrent\futures\thread.py", line 58, in run
File "gradio_client\client.py", line 1158, in _inner

predictions = _predict(*data)

File "gradio_client\client.py", line 1275, in _predict

raise AppError(

gradio_client.exceptions.AppError: The upstream Gradio app has raised an exception: Value: false is not in the list of choices: [False, True]


=
Windows-10-10.0.19045-SP0
version:v3.81
frozen:True
language:zh

1 Replies

这个错误是由于 CosyVoice2 的 Gradio API 参数类型不匹配导致的。错误信息显示传递了小写的 false 值,但 API 期望的是大写的 FalseTrue

请按以下步骤解决:

  1. 临时解决方案:暂时切换到其他 TTS 配音渠道,如 Edge-TTSOpenAI TTS
  2. 等待修复:这是一个已知的 API 兼容性问题,需要等待 CosyVoice2 官方修复其 Gradio 接口。
  3. 检查更新:关注 pyVideoTrans 的后续版本更新,开发者可能会针对此问题发布修复。

如果必须使用 CosyVoice2,建议:

  • 在软件的 "TTS配音设置" 中重新选择 CosyVoice2 并保存配置
  • 重启软件后再次测试

如果问题持续存在,建议使用其他稳定的 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.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions