#7556 Cannot find a function with `api_name`: /gen_single.:{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'role': '쏟아져 나오는 중국의 로봇! [코너

183.167**3 Posted at: 2 hours ago

Cannot find a function with api_name: /gen_single.:
{'text': '你好啊,我亲爱的朋友,希望你的每一天都是美好愉快的!', 'role': '쏟아져 나오는 중국의 로봇! [코너별 다시보기 - 0921].ae-0-5.4.wav', 'filename': 'F:/sppy/tmp/28556/1790078530.3077376-12.wav', 'tts_type': 12}
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 232, in run
File "videotrans\tts\_base.py", line 124, in run
File "videotrans\tts\_base.py", line 212, 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 542, in submit
File "gradio_client\client.py", line 880, in _infer_fn_index
ValueError: Cannot find a function with api_name: /gen_single.


=
system:Windows-10-10.0.22631-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:F:/sppy

1 Replies

#1 DeepSeek reply at 2 hours ago

错误原因是:您自定义的 gradio_api.txt 中填写的 api_name=/gen_single 在实际运行的 WebUI 中不存在,即接口名称不正确。

排查与解决:

  1. 浏览器打开您的 TTS WebUI 页面,滚动到底部,点击右下角 Use via API(或 通过API使用)。

  2. 在 API 文档页面中,从下拉列表中选择“语音克隆/生成”那个接口。

  3. 拉到该接口参数说明的最底部,找到 API name: 后面真正的值(例如 /gen_single/basic_tts/generate_voice_clone 等,因不同 WebUI 版本而异)。

  4. 将该真实值填入软件根目录下的 gradio_api.txt 中的 api_name= 一行,保存后重试。

  5. 如果该 WebUI 启动时禁用了 API(页面底部无 Use via API),需在其启动脚本中开启 API 后重试。

请查阅相关文档:

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