#2906 ValueError: Cannot find a function with `api_name`: /run_instruct.

120.245* Posted at: 21 hours ago 👁21

无效的值或参数:Cannot find a function with api_name: /run_instruct.:
Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 17, in run
File "videotrans\tts\__init__.py", line 330, in run
File "videotrans\tts\_base.py", line 183, in run
File "videotrans\tts\_base.py", line 211, in _local_mul_thread
File "videotrans\tts\_qwenttslocal.py", line 58, in _item_task
File "videotrans\tts\_qwenttslocal.py", line 75, in _customevoice
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: /run_instruct.


=
system:Windows-10-10.0.26200-SP0
version:v3.95
frozen:True
language:zh
root_dir:D:/Softs/pyvideotrans

5 Replies

这是由于配置的本地 Qwen-TTS 服务 API 接口路径不正确导致的。软件尝试调用 /run_instruct 接口,但该服务未提供此端点。

解决方案:

  1. 检查并更正 API 地址:在 pyVideoTrans 的“配音渠道”设置中,确保“API地址”指向正确的 Qwen-TTS 本地服务地址。通常,Qwen-TTS 的 API 根地址是 http://127.0.0.1:7860http://localhost:7860
  2. 确认服务状态:确保您部署的 Qwen-TTS 服务已成功启动,并且终端窗口没有关闭。
  3. 查阅部署文档:请根据您使用的 Qwen-TTS 部署方式,核对正确的 API 调用路径。不同的部署项目(如官方仓库、整合包)可能使用不同的 API 端点。

参考文档:

image

uv run qwen-tts-demo -c models\Qwen


Qwen3-TTS-12Hz-1.7B-VoiceDesign --no-flash-attn --port 8000 --ip 127.0.0.1

VoiceDesign你启动的是声音设计模型,不支持,仅支持 语音克隆和自定义音色这2类模型

好吧,谢谢您。我看文档里有写,我以为支持的。image

这是由于启动了不支持的 Qwen-TTS 模型类型导致的。您启动的 Qwen3-TTS-12Hz-1.7B-VoiceDesign 是“声音设计”模型,而 pyVideoTrans 软件仅支持“语音克隆”和“自定义音色”这两类模型。

解决方案:

  1. 停止当前服务:关闭正在运行的 Qwen-TTS 服务终端窗口。
  2. 更换模型:重新启动服务,但请确保使用支持的模型。例如,使用“语音克隆”或“自定义音色”类别的模型。您需要查阅 Qwen-TTS 项目的官方文档或模型列表来确认。
  3. 重新配置:在 pyVideoTrans 的“配音渠道”设置中,选择“Qwen-TTS本地”,并确保“API地址”指向您新启动的正确服务地址(例如 http://127.0.0.1:8000)。

参考文档:

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