#2352 换了几个配音渠道,配音结束时弹出‘程序内部错误:'NoneType' object has no attribute 'seek'’错误的提示,没生成最终音频文件

2409:8a70* Posted at: 4 hours ago 👁9

程序内部错误:'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='E:/pyVideoTrans3.9/tmp/1800/6d6951cbb9', target_dir='E:/pyVideoTrans3.9/output', 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='E:/pyVideoTrans3.9/output/02 CAT-p02.srt', source_wav=None, source_wav_output=None, target_wav='E:/pyVideoTrans3.9/output/02 CAT-p02.mp3', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='02-p02', 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='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='E:/pyVideoTrans3.9/output/02 CAT-p02.srt', basename='02 CAT-p02.srt', ext='srt', dirname='E:/pyVideoTrans3.9/output', shound_del_name=None, uuid='6d6951cbb9', 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.26100-SP0
version:v3.92
frozen:True
language:zh
root_dir:E:/pyVideoTrans3.9

1 Replies

这个错误表明在尝试拼接合成的音频片段时,某个音频文件未能正确加载(值为 None)。从您的日志看,您正在使用“批量为字幕配音”功能,并且启用了“配音自动加速”(voice_autorate=True)。

核心原因与解决方案:

  1. 最可能的原因:音频片段生成失败或路径错误。 某个配音片段没有成功生成,导致程序在拼接时遇到了一个“空”文件。
  2. 直接解决步骤:

    • 检查临时文件夹: 前往 E:/pyVideoTrans3.9/tmp/1800/6d6951cbb9 这个临时目录,查看里面是否有 .mp3.wav 格式的音频文件。如果文件数量很少或为空,说明配音环节就出错了。
    • 更换配音角色/渠道: 您当前使用的是 Yunjian(Male/CN) 角色(Edge-TTS)。请尝试切换到另一个配音角色(如 Xiaoxiao)或另一个配音渠道(如 VITS-cnen),然后重新执行。
    • 关闭“配音自动加速”: 在主界面或任务设置中,取消勾选“配音自动加速”。这个功能有时在处理特定音频格式或异常片段时会引发问题。先关闭它,看是否能正常生成完整音频。
    • 检查字幕文件: 确认您的字幕文件 E:/pyVideoTrans3.9/output/02 CAT-p02.srt 格式正确,没有空行或异常的时间戳。

如果以上步骤无效,请按以下方式提供更多信息以便进一步诊断:

  1. 在软件 菜单 -> 工具 -> 选项 -> 高级选项 中,确认“配音调整”下的“同时配音字幕数”是否设置过高(建议先设为 1)。
  2. 提供 E:/pyVideoTrans3.9/logs/ 目录下最新的日志文件(以 .log 结尾),其中可能包含更详细的配音过程错误。
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