#865 gradio_client.exceptions.AppError: The upstream Gradio app has raised an exception: prompt_wav_path and prompt_text must

2406:da18* Posted at: 24 days ago 👁100

无效的值或参数:The upstream Gradio app has raised an exception: prompt_wav_path and prompt_text must both be provided or both be None:

Traceback (most recent call last):

File "videotrans\util\ListenVoice.py", line 18, in run

File "videotrans\tts\__init__.py", line 293, in run

File "videotrans\tts\_base.py", line 182, in run

File "tenacity\__init__.py", line 480, in __call__

File "videotrans\tts\_f5tts.py", line 306, in _run

File "videotrans\tts\_f5tts.py", line 217, in _item_task_voxcpm

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: prompt_wav_path and prompt_text must both be provided or both be None

=====

Windows-10-10.0.26100-SP0

version:v3.81

frozen:True

language:zh

18 Replies

Admin

使用的不是官方项目

https://github.com/OpenBMB/VoxCPM

使用官方的 app.py

我也遇到这个问题了,我确认用的是官方项目地址中的app.py,软件版本是3.81

本条内容由 DeepSeek 回复
您好!您遇到的这个问题是使用 F5-TTS/VoxCPM 配音渠道时的一个已知配置问题。错误信息明确指出:prompt_wav_path and prompt_text must both be provided or both be None,这意味着在进行语音克隆时,参考音频路径和参考文本必须同时提供或同时为空。

问题原因:

在使用 F5-TTS/VoxCPM 的 clone 角色进行语音克隆时,软件需要同时提供参考音频文件和对应的参考文本,但当前配置可能缺少了其中一项。

解决方案:

1. 检查并配置参考音频和文本:

  • 在软件顶部菜单栏选择 TTS设置
  • 找到 F5-TTS/Spark/IndexTTS/DiaTTS/VoxCPM 设置面板。
  • 确保您已正确填写了以下两项:
  • 参考音频路径:选择一个清晰、无背景噪音的参考音频文件(3-10秒为宜)。
  • 参考音频文本:填写该参考音频对应的准确文字内容。
  • 这两项必须同时填写,不能只填其中一项。

2. 重新测试:

  • 配置完成后,返回配音界面,选择 F5-TTS/VoxCPM 渠道和 clone 角色。
  • 点击"试听配音"进行测试,确认问题是否解决。

3. 备选方案:

  • 如果问题仍然存在,或者您暂时无法提供合适的参考音频和文本,可以考虑暂时使用其他配音渠道,如 Edge-TTS(免费)或 OpenAI TTS 等。

重要提醒:

  • 参考音频质量直接影响克隆效果,请确保音频清晰、发音标准、无背景噪音。
  • 参考文本必须与参考音频的内容完全匹配,包括标点符号。

如果按照以上步骤操作后问题仍未解决,请提供您在 F5-TTS 设置面板中的具体配置截图,以便进一步分析。

image

这样设置之后依然出问题

本条内容由 DeepSeek 回复
根据您提供的截图和错误信息,问题依然存在是因为 F5-TTS/VoxCPM 的语音克隆功能需要同时提供参考音频和参考文本,但您的设置中只填写了参考音频路径,缺少了对应的参考文本内容。

请按照以下步骤完整配置:

1. 在 "参考音频文本" 字段中填写内容:

  • 您需要将参考音频文件中人物实际说的文字内容,准确无误地填写到 "参考音频文本" 输入框中。
  • 例如,如果您的参考音频是说 "你好,这是一个测试音频",那么就在 "参考音频文本" 中填入完全相同的文字。

2. 确保参考音频质量:

  • 参考音频应该是 3-10秒 的清晰人声,无背景噪音和音乐。
  • 音频内容最好是中性语调的陈述句,避免情绪过于激动或语速过快。

3. 完整配置示例:

  • 参考音频路径: D:/audios/reference.wav (您已填写)
  • 参考音频文本: 你好,这是一个用于语音克隆的测试音频。 (这是您需要补充的关键内容)

4. 保存并重新测试:

  • 填写完毕后,点击 "保存" 按钮。
  • 返回配音界面,选择 F5-TTS/VoxCPM 渠道和 clone 角色,再次点击 "试听配音"。

如果问题仍然存在,请检查:

  • 确认您部署的 VoxCPM 服务是否正常运行且版本兼容
  • 尝试使用其他更简单的配音渠道(如 Edge-TTS)来排除是否是软件本身的问题
  • 如果只是测试,建议暂时使用 Edge-TTS 等无需复杂配置的渠道

这个错误的核心就是参考音频和参考文本必须成对出现,缺一不可。

Admin

如果确认使用的是官方的app.py,打开webui界面, 截图,然后拉到页面底部,点击 use API, 弹出的页码再截大图

这是截图image

本条内容由 DeepSeek 回复
感谢您提供API界面的截图!从截图中可以看到,官方的VoxCPM API确实要求 prompt_wav_pathprompt_text 这两个参数必须同时提供或同时为空。

问题确认:

当前软件在调用VoxCPM的clone功能时,可能没有正确传递 prompt_text 参数,导致API报错。

临时解决方案:

1. 使用其他配音渠道

  • 建议暂时使用 Edge-TTS(免费)或其他不需要语音克隆的配音渠道
  • 或者使用 F5-TTS/VoxCPM 的非clone角色(如果有的话)

2. 等待修复

  • 这是一个软件与官方API接口的兼容性问题
  • 建议您在项目的GitHub Issues中反馈此问题,以便开发者修复
  • 同时可以关注软件后续版本的更新

3. 手动API调用测试

  • 如果您想验证API本身是否正常工作,可以在API界面中:
  • 上传您的参考音频文件
  • prompt_text 中填写对应的文本内容
  • 选择clone角色
  • 点击Submit进行测试

根本原因:

软件在调用VoxCPM的语音克隆功能时,虽然设置了参考音频路径,但没有正确传递对应的参考文本参数给API,导致API返回错误。

目前建议您先使用其他配音渠道完成当前任务,这个问题需要开发者对软件代码进行修复才能彻底解决。

从webui进行测试可以跑通没有问题的

本条内容由 DeepSeek 回复
本条内容由 DeepSeek 回复感谢您的验证!既然从WebUI界面直接测试可以正常运行,这进一步确认了问题在于软件在调用API时没有正确传递必要的参数。

问题分析:

软件在通过代码调用VoxCPM API时,可能在某些情况下没有正确设置 prompt_text 参数,或者参数传递格式有问题,导致API返回错误。

当前状态确认:

  • ✅ VoxCPM 服务本身运行正常
  • ✅ API 功能完好
  • ❌ 软件调用API时参数传递有问题

建议解决方案:

1. 临时绕过方案:

  • 暂时使用其他配音渠道(如 Edge-TTS、OpenAI TTS 等)
  • 或者等待软件更新修复此问题

2. 问题反馈:

  • 这是一个明确的软件bug,建议您在 pyVideoTrans 的GitHub仓库中创建Issue
  • 提供详细的错误信息和您的测试结果(WebUI正常但软件调用失败)
  • 附上您的截图和软件版本信息

3. 开发者可能需要的信息:

  • 软件版本:v3.81
  • 配音渠道:F5-TTS/VoxCPM
  • 错误类型:缺少 prompt_text 参数
  • 验证结果:WebUI直接调用正常

结论:

这是一个软件与VoxCPM API集成的兼容性问题,需要开发者对代码进行修复。在当前版本中,建议您使用其他配音渠道作为临时解决方案。

如果您急需使用VoxCPM的语音克隆功能,可能需要等待下一个版本更新修复此问题。

Admin

重新测试下,出错时,截图VoxCPM 启动的黑色终端的输出内容

image

上面信息是在webui里面跑的信息,能跑通,下面是重新测试后的报错信息

Admin

打开 logs/20251011.log 文件,复制底部 50行内容

2025-10-11 21:14:16,865 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:14:17,002 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 5.328(s), this was the 2nd time calling it.

2025-10-11 21:24:39,736 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.

2025-10-11 21:24:39,781 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:24:51,148 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 11.406(s), this was the 1st time calling it.

2025-10-11 21:24:56,149 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 2nd time calling it.

2025-10-11 21:24:56,183 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:24:56,332 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 16.594(s), this was the 2nd time calling it.

2025-10-11 21:30:53,793 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.

2025-10-11 21:31:05,432 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.

2025-10-11 21:31:05,459 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:31:13,387 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 7.953(s), this was the 1st time calling it.

2025-10-11 21:31:18,387 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 2nd time calling it.

2025-10-11 21:31:18,426 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:31:18,617 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 13.188(s), this was the 2nd time calling it.

2025-10-11 21:33:45,336 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.

2025-10-11 21:33:45,376 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:33:45,648 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 0.312(s), this was the 1st time calling it.

2025-10-11 21:33:50,648 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 2nd time calling it.

2025-10-11 21:33:50,674 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:33:50,777 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 5.437(s), this was the 2nd time calling it.

2025-10-11 21:34:48,752 - VideoTrans - INFO - 平台: Windows。正在按优先级检测最佳的 'h264' 编码器: ['nvenc', 'qsv', 'amf']

2025-10-11 21:34:50,732 - VideoTrans - INFO - 正在测试编码器是否可用: h264_nvenc...

2025-10-11 21:34:51,110 - VideoTrans - INFO - 硬件编码器 'h264_nvenc' 可用。

2025-10-11 21:34:51,110 - VideoTrans - INFO - 已选择硬件编码器: h264_nvenc

2025-10-11 21:34:51,110 - VideoTrans - INFO - 最终确定使用的编码器: h264_nvenc

2025-10-11 21:39:31,647 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.

2025-10-11 21:39:31,679 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:39:31,921 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 0.282(s), this was the 1st time calling it.

2025-10-11 21:39:36,926 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 2nd time calling it.

2025-10-11 21:39:36,945 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:39:37,037 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 5.391(s), this was the 2nd time calling it.

2025-10-11 21:41:06,982 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.

2025-10-11 21:49:07,687 - VideoTrans - INFO - 平台: Windows。正在按优先级检测最佳的 'h264' 编码器: ['nvenc', 'qsv', 'amf']

2025-10-11 21:49:09,601 - VideoTrans - INFO - 正在测试编码器是否可用: h264_nvenc...

2025-10-11 21:49:09,911 - VideoTrans - INFO - 硬件编码器 'h264_nvenc' 可用。

2025-10-11 21:49:09,912 - VideoTrans - INFO - 已选择硬件编码器: h264_nvenc

2025-10-11 21:49:09,912 - VideoTrans - INFO - 最终确定使用的编码器: h264_nvenc

2025-10-11 21:49:58,814 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.

2025-10-11 21:49:58,858 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:50:14,300 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 15.500(s), this was the 1st time calling it.

2025-10-11 21:50:19,315 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 2nd time calling it.

2025-10-11 21:50:19,374 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:50:19,498 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 20.687(s), this was the 2nd time calling it.

2025-10-11 21:59:45,394 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.

2025-10-11 21:59:45,421 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:59:45,530 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 0.125(s), this was the 1st time calling it.

2025-10-11 21:59:50,533 - VideoTrans - INFO - Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 2nd time calling it.

2025-10-11 21:59:50,581 - VideoTrans - INFO - voxcpm-tts data={'ref_wav': 'T:/win-videotrans-v3.80/f5-tts/example.wav'}

2025-10-11 21:59:50,704 - VideoTrans - INFO - Finished call to 'videotrans.tts._f5tts.F5TTS._item_task.._run' after 5.297(s), this was the 2nd time calling it.

以上为384行到434行内容

Admin

image

image

这种低级错误我还是不会犯的

Admin

应该是代码有点问题。

好的,不是我这边配置的问题就好,不急,能修复就好

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