#4732 配音阶段出错 [Index TTS(本地)] 处理数据时缺少必需的键:'emo_control_method'Traceback (most recent call last): File "videotrans\tts\_f5tts.p

2409:8a55* Posted at: 3 hours ago

配音阶段出错 [Index TTS(本地)] 处理数据时缺少必需的键:'emo_control_method'
Traceback (most recent call last):
File "videotrans\tts\_f5tts.py", line 188, in _item_task_index
File "gradio_client\client.py", line 499, in predict
File "gradio_client\client.py", line 1484, in result
File "concurrent\futures\_base.py", line 458, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "concurrent\futures\thread.py", line 58, in run
File "gradio_client\client.py", line 1080, in _inner
File "gradio_client\client.py", line 1200, in _predict
gradio_client.exceptions.AppError: CUDA error: unknown error
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 213, in run
File "videotrans\task\trans_create.py", line 735, in dubbing
File "videotrans\task\trans_create.py", line 1048, in _tts
File "videotrans\tts\__init__.py", line 421, in run
File "videotrans\tts\_base.py", line 193, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_f5tts.py", line 335, in _run
File "videotrans\tts\_f5tts.py", line 190, in _item_task_index
KeyError: 'emo_control_method'
TaskCfgVTT(is_cuda=True, uuid='0b2708ca22', cache_folder='D:/win-pyvideotrans-v3.99-428/tmp/7788/0b2708ca22', target_dir="F:/Youtube/Tubedown Download/2026-05-26/01_UE/_video_out/LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080]-mp4", source_language='英语', source_language_code='en', source_sub="F:/Youtube/Tubedown Download/2026-05-26/01_UE/_video_out/LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080]-mp4/en.srt", source_wav='D:/win-pyvideotrans-v3.99-428/tmp/7788/0b2708ca22/en.wav', source_wav_output="F:/Youtube/Tubedown Download/2026-05-26/01_UE/_video_out/LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080]-mp4/en.m4a", target_language='简体中文', target_language_code='zh-cn', target_sub="F:/Youtube/Tubedown Download/2026-05-26/01_UE/_video_out/LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080]-mp4/zh-cn.srt", target_wav='D:/win-pyvideotrans-v3.99-428/tmp/7788/0b2708ca22/target.wav', target_wav_output="F:/Youtube/Tubedown Download/2026-05-26/01_UE/_video_out/LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080]-mp4/zh-cn.m4a", name="F:/Youtube/Tubedown Download/2026-05-26/01_UE/有声/07/LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080].mp4", noextname="LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080]", basename="LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080].mp4", ext='mp4', dirname='F:/Youtube/Tubedown Download/2026-05-26/01_UE/有声/07', shound_del_name=None, translate_type=4, tts_type=11, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='Sound_005_90.wav', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=1, fix_punc=True, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4="F:/Youtube/Tubedown Download/2026-05-26/01_UE/_video_out/LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080]-mp4/LES STREAMERS RÉAGISSENT À L'ANNONCE UE 6 (kaydop pleure) - Best of RL FR #627 Réactions-[s3kaMw6baxE]-[1920x1080].mp4", novoice_mp4='D:/win-pyvideotrans-v3.99-428/tmp/7788/0b2708ca22/novoice.mp4', is_separate=True, embed_bgm=True, instrument='D:/win-pyvideotrans-v3.99-428/tmp/7788/0b2708ca22/instrument.wav', vocal='D:/win-pyvideotrans-v3.99-428/tmp/7788/0b2708ca22/vocal.wav', back_audio='', clear_cache=False, background_music=None, subtitle_type=3, only_out_mp4=False, recogn2pass=False, output_srt=2, copysrt_rawvideo=False)

1 Replies

这是 Index-TTS 接口版本与软件未同步导致的参数不匹配。

  • 核心原因:Index-TTS 本地 API 升级后增加了 emo_control_method 必选参数,但当前使用的 v3.99 版本代码未包含该参数,因此报 KeyError
  • 底层 CUDA 错误:可能是显存不足或 CUDA 驱动/工具链不兼容,后续可在升级后按需调整。

解决方案:

  1. 升级到最新完整包 v4.00

  2. 确认 Index-TTS 服务是否正常

    • 确保 Index-TTS 的 API 地址(默认 http://127.0.0.1:7860)可在浏览器访问,且服务已启动。
    • 如使用外部部署,检查其在 f5-tts/ 文件夹内的参考音频文件是否存在且符合要求(.wav,3-10秒)。
  3. 调整 CUDA 显存占用(可选)

    • 若仍显存不足,进入 菜单 → 工具/选项 → 高级选项,将 CUDA数据类型 改为 float16beam_sizebest_of 均设为 1,并勾选 Whisper预分割音频

请查阅相关文档:

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