#2702 TaskCfg(cache_folder='D:/A/tmp/24068/fbe4df12c5', target_dir='D:/A/output/tts', remove_noise=False, is_separate=False, d

120.244* Posted at: 1 hour ago 👁6

程序内部错误:'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/24068/fbe4df12c5', 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/24068/20260118-000902.srt', source_wav=None, source_wav_output=None, target_wav='D:/A/output/tts/20260118-000902.wav', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='20260118-000902', 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='大大大.wav', copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=10, recogn_type=None, model_name=None, split_type=0, voice_autorate=True, video_autorate=False, cuda=False, name='D:/A/tmp/24068/20260118-000902.srt', basename='20260118-000902.srt', ext='srt', dirname='D:/A/tmp/24068', shound_del_name=None, uuid='fbe4df12c5', 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_role 指向了一个本地音频文件 大大大.wav

核心原因与解决方案:

  1. 首要原因:指定的参考音频文件 大大大.wav 不存在或路径错误。

    • 检查文件路径: 确认 大大大.wav 文件是否确实存在于 D:/A/tmp/24068/ 目录下。
    • 文件名规范: 确保文件名没有隐藏的扩展名错误(例如,实际文件名为 大大大.wav.wav)或特殊字符。建议将文件重命名为纯英文或数字(如 ref.wav),然后重新选择。
  2. 次要原因:音频文件格式问题。

    • 格式兼容性: 确保 .wav 文件是标准的 PCM 编码格式。你可以用其他播放器(如 VLC)尝试播放该文件,确认其可读。
    • 重新转换: 如果文件有问题,可以使用格式工厂、Audacity 等工具将其重新转换为标准的 WAV (PCM) 格式。

操作步骤:

  1. 前往 D:/A/tmp/24068/ 文件夹,检查 大大大.wav 是否存在且能正常播放。
  2. 如果文件不存在,请将正确的参考音频文件放入该目录。
  3. 如果文件存在但可能损坏,请用音频编辑软件重新保存或转换一次。
  4. 在软件中重新运行任务,确保正确选择了该参考音频文件。

如果以上步骤无法解决,请提供 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