#3336 使用云算力部署b站index-tts2后执行配音无反应

2409:896a* Posted at: 2 days ago 👁23

试听测试都没问题,正式执行配音无反应

logs内容:
[DEBUG] [字幕配音]渠道10:共耗时:6s
[INFO] Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.
Loaded as API: http://127.0.0.1:8080/
[DEBUG] index-tts data={'ref_wav': 'C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/f5-tts/aa.wav'}
[DEBUG] post={'prompt': {'path': 'C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/f5-tts/aa.wav', 'meta': {'_type': 'gradio.FileData'}, 'orig_name': 'aa.wav'}, 'text': '你好啊我的朋友,希望你今天开心!', 'api_name': '/gen_single', 'emo_ref_path': {'path': 'C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/f5-tts/aa.wav', 'meta': {'_type': 'gradio.FileData'}, 'orig_name': 'aa.wav'}}
[DEBUG] result={'visible': True, 'value': 'C:\Users\MSI\AppData\Local\Temp\gradio\ad3605b59f957f141617ba04d971761e3446b0163d160694163906b4a414c5c7\spk_1771909197.wav', '__type__': 'update'}
[DEBUG] cmd=['C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/ffmpeg/ffmpeg.exe', '-hide_banner', '-ignore_unknown', '-threads', '0', '-y', '-i', 'C:\Users\MSI\AppData\Local\Temp\gradio\ad3605b59f957f141617ba04d971761e3446b0163d160694163906b4a414c5c7\spk_1771909197.wav', '-ar', '48000', '-ac', '2', '-c:a', 'pcm_s16le', 'C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/tmp/10672/1771909203.619228-10.wav']
[DEBUG] [字幕配音]渠道10:共耗时:7s
[DEBUG] 配音 self.cfg=TaskCfg(cache_folder='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/tmp/10672/72e18e2cd5', target_dir='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/output/tts', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code='zh-cn', source_sub=None, target_sub='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/tmp/10672/20260224-130023.srt', source_wav=None, source_wav_output=None, target_wav='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/output/tts/20260224-130023.wav', target_wav_output=None, subtitles='', novoice_mp4=None, noextname='20260224-130023', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='aa.wav', copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=10, recogn_type=None, model_name=None, voice_autorate=False, video_autorate=False, is_cuda=True, name='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/tmp/10672/20260224-130023.srt', basename='20260224-130023.srt', ext='srt', dirname='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/tmp/10672', shound_del_name=None, uuid='72e18e2cd5', remove_silent_mid=False, align_sub_audio=False, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False, fix_punc=False, recogn2pass=False)
[INFO] Starting call to 'videotrans.tts._f5tts.F5TTS._item_task.._run', this is the 1st time calling it.
Loaded as API: http://127.0.0.1:8080/
[DEBUG] [字幕配音]渠道10:共耗时:1s
[DEBUG] 配音 self.cfg=TaskCfg(cache_folder='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/tmp/10672/d32d49039f', target_dir='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/output/tts', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code='zh-cn', source_sub=None, target_sub='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/tmp/10672/20260224-130046.srt', source_wav=None, source_wav_output=None, target_wav='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/output/tts/20260224-130046.wav', target_wav_output=None, subtitles='', novoice_mp4=None, noextname='20260224-130046', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='aa.wav', copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=10, recogn_type=None, model_name=None, voice_autorate=False, video_autorate=False, is_cuda=True, name='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/tmp/10672/20260224-130046.srt', basename='20260224-130046.srt', ext='srt', dirname='C:/Users/MSI/Downloads/win-pyvideotrans-v3.97/tmp/10672', shound_del_name=None, uuid='d32d49039f', remove_silent_mid=False, align_sub_audio=False, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False, fix_punc=False, recogn2pass=False)image

3 Replies

这是由于在正式执行配音时,软件尝试调用云算力部署的 Index-TTS2 服务,但可能因网络、服务状态或路径问题导致请求失败,而日志未能捕获到关键错误。

根据日志,软件已成功连接到 http://127.0.0.1:8080/ 并进行了试听测试(生成了临时音频文件)。但在正式处理字幕文件时,日志显示 [字幕配音]渠道10:共耗时:1s,耗时极短,表明可能请求未成功发送或服务端未返回有效结果。

请按以下步骤排查:

  1. 确认服务状态:确保云算力服务器上的 Index-TTS2 API 服务(端口 8080)仍在运行,且网络可从您的 pyVideoTrans 所在机器访问(如果云算力是远程服务器,请勿使用 127.0.0.1)。
  2. 检查 API 地址:在 pyVideoTrans 的“配音设置”中,确认“API地址”填写正确。如果 Index-TTS2 部署在远程云服务器,应使用服务器的公网 IP 或域名,例如 http://<云服务器IP>:8080/
  3. 检查防火墙与端口:确保云服务器的 8080 端口已在安全组/防火墙中开放,允许来自您本地机器的入站连接。
  4. 查看服务端日志:登录云算力服务器,查看 Index-TTS2 服务运行时的终端输出或日志文件,检查在 pyVideoTrans 正式执行请求时是否有错误信息。
  5. 路径与权限:确认云服务器上 Index-TTS2 服务有权限读取和写入临时文件,且存储空间充足。
  6. 本地测试:在本地浏览器或使用 curl 命令测试 API 接口是否正常工作,例如:curl -X POST http://<API地址>/gen_single -H "Content-Type: application/json" -d "{\"text\": \"测试句子\"}"(根据 Index-TTS2 的实际 API 格式调整)。

请查阅相关文档:

该端口已经映射到本地,且可以打开http://127.0.0.1:8080页面image

这是由于正式执行配音时,软件向 Index-TTS2 API 发送的请求格式或参数与试听测试时不同,导致服务端处理失败或返回了错误但未被日志捕获。根据您提供的截图,API 服务(http://127.0.0.1:8080)已成功启动并显示 Gradio 界面,证明服务本身是运行的。

问题核心在于正式执行与试听测试的请求差异。请按以下步骤排查:

  1. 检查 API 请求格式:正式执行时,软件可能发送了包含多句字幕的批量请求,而试听是单句请求。请确认您的 Index-TTS2 服务是否支持批量处理(/gen_batch 接口)以及其要求的 JSON 格式。根据知识库,F5-TTS/Index-TTS 的 API 调用格式需严格匹配。
  2. 查看服务端详细日志:这是最关键的一步。在运行 Index-TTS2 服务的终端或命令行窗口中,查看当 pyVideoTrans 正式执行配音任务时,服务端打印出的完整请求和错误信息。错误可能包含“400 Bad Request”、“500 Internal Server Error”或具体的参数验证失败提示。
  3. 验证 API 端点:在 pyVideoTrans 的“配音设置” -> “API地址”中,确保填写的是 http://127.0.0.1:8080 (注意末尾没有斜杠 /,除非服务明确要求)。有时多余的斜杠会导致路径错误。
  4. 检查参考音频路径:正式执行时,软件传递给 API 的 ref_wav(参考音频路径)可能与试听时不同。确保该路径在服务端是可访问的有效文件路径。如果使用云算力,路径可能是云服务器上的路径,而非您本地的 C:/Users/... 路径。
  5. 临时降低并发:在 pyVideoTrans 的“高级选项”中,将“同时配音线程数”设置为 1,将“配音后暂停秒数”设置为 5,以减少对 API 服务的压力,避免因并发过高导致的连接失败或限流。
  6. 手动测试 API:使用命令行工具(如 curl)或 API 测试工具(如 Postman)模拟正式请求。例如,尝试发送一个包含多句文本的 POST 请求到 http://127.0.0.1:8080/gen_batch(如果存在),查看服务端响应。

请查阅相关文档:

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