#2644 TaskCfg(cache_folder='D:/A/tmp/31424/f8b17c53d3', target_dir='D:/A/output/tts', remove_noise=False, is_separate=False, d

5.34* Posted at: 22 hours ago 👁15

程序内部错误:'NoneType' object has no attribute 'seek'
Traceback (most recent call last):
File "pydub\audio_segment.py", line 670, in from_file
File "pydub\audio_segment.py", line 818, in _from_safe_wav
AttributeError: 'NoneType' object has no attribute 'seek'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 259, in run
File "videotrans\task\_dubbing.py", line 268, in align
File "videotrans\task\_rate.py", line 278, in run
File "videotrans\task\_rate.py", line 819, in _concat_audio
File "pydub\audio_segment.py", line 678, in from_file
AttributeError: 'NoneType' object has no attribute 'seek'

TaskCfg(cache_folder='D:/A/tmp/31424/f8b17c53d3', target_dir='D:/A/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='D:/A/tmp/31424/20260113-233718.srt', source_wav=None, source_wav_output=None, target_wav='D:/A/output/tts/20260113-233718.wav', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='20260113-233718', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+1%', pitch='+1Hz', voice_rate='+0%', voice_role='Yunjian(Male/CN)', copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=0, recogn_type=None, model_name=None, split_type=0, voice_autorate=True, video_autorate=False, cuda=False, name='D:/A/tmp/31424/20260113-233718.srt', basename='20260113-233718.srt', ext='srt', dirname='D:/A/tmp/31424', shound_del_name=None, uuid='f8b17c53d3', remove_silent_mid=False, align_sub_audio=False, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.92
frozen:True
language:zh
root_dir:D:/A

1 Replies

此错误表明在音频处理阶段,程序试图读取一个不存在的音频文件(NoneType)。根据您提供的 TaskCfg 信息,您正在执行“批量为字幕配音”功能,且已启用了“音频自动加速”(voice_autorate=True)。

核心原因:在尝试对生成的配音音频进行加速处理时,程序未能成功加载目标音频文件 target_wav(路径为 D:/A/output/tts/20260113-233718.wav),导致 pydub 库读取时遇到 None 对象。

解决方案

  1. 检查音频文件:请手动确认路径 D:/A/output/tts/20260113-233718.wav 下是否存在该 .wav 文件。如果文件不存在,说明之前的配音步骤可能失败了。
  2. 重新生成音频

    • 在“批量为字幕配音”界面,取消勾选“音频自动加速”
    • 重新运行任务,看是否能正常生成 .wav 文件。
    • 如果取消加速后仍失败,请检查配音角色 Yunjian(Male/CN) 是否可用,或尝试更换为其他角色(如 Edge-TTS 的角色)。
  3. 检查临时文件夹:如果文件确实存在但仍报错,可能是文件损坏或权限问题。请清理临时文件夹 D:/A/tmp/31424/f8b17c53d3 后重试。
  4. 简化操作:如果以上步骤无效,请尝试:

    • 将字幕文件移动到更短的纯英文路径下(如 D:/test.srt)。
    • 使用更稳定的配音渠道(如 Edge-TTS)。

如果问题依旧,请提供 D:/A/videotrans/logs/ 目录下的最新日志文件以便进一步分析。

请查看更多参考文档:

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

Trending Questions