#2580 TaskCfg(cache_folder='D:/SOS/win-pyvideotrans-v3.92/tmp/10680/d19d785aea', target_dir='E:/时之沙/JUY-872-U', remove_noise=F

59.56* Posted at: 21 hours ago 👁10

配音阶段出错 [Edge-TTS(免费)] 文件或数据解码失败,编码格式错误:invalid continuation byte
Traceback (most recent call last):
File "videotrans\task\job.py", line 224, in run
File "videotrans\task\_dubbing.py", line 47, in dubbing
File "pathlib.py", line 1133, in read_text
File "codecs.py", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 34: invalid continuation byte

TaskCfg(cache_folder='D:/SOS/win-pyvideotrans-v3.92/tmp/10680/d19d785aea', target_dir='E:/时之沙/JUY-872-U', 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:/时之沙/JUY-872-U/JUY-872(3).srt', source_wav=None, source_wav_output=None, target_wav='E:/时之沙/JUY-872-U/JUY-872(3).wav', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='JUY-872(3)', 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='Xiaoyi(Female/CN)', copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=0, recogn_type=None, model_name=None, split_type=0, voice_autorate=False, video_autorate=False, cuda=False, name='E:/时之沙/JUY-872-U/JUY-872(3).srt', basename='JUY-872(3).srt', ext='srt', dirname='E:/时之沙/JUY-872-U', shound_del_name=None, uuid='d19d785aea', 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:D:/SOS/win-pyvideotrans-v3.92

1 Replies

该错误表明在读取字幕文件时发生了编码问题。字幕文件 JUY-872(3).srt 可能不是标准的 UTF-8 编码,导致 Edge-TTS 无法正确解析。

请按以下步骤解决:

  1. 检查并转换字幕文件编码

    • 使用记事本或专业的文本编辑器(如 Notepad++)打开 E:/时之沙/JUY-872-U/JUY-872(3).srt 文件。
    • 查看文件编码。如果显示为 ANSIGB2312GBK 等,需要将其转换为 UTF-8
    • 在 Notepad++ 中,点击菜单栏的 编码 -> 转为 UTF-8 编码,然后保存文件。
  2. 重新处理

    • 在软件主界面,确保勾选了 “清理已生成” 选项。
    • 重新导入处理后的 SRT 文件或原始视频文件,再次运行配音流程。
  3. 如果问题依旧

    • 请检查字幕文件内容是否包含异常字符或损坏。
    • 可以尝试使用软件的 “工具箱 -> 批量翻译 SRT” 功能,将字幕文件重新保存一次,这通常会生成标准编码的字幕。

请查看更多参考文档:

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