#2504 TaskCfg(cache_folder='C:/Users/ssd/Downloads/win-pyvideotrans-v3.91/tmp/23444/43362cf6d9', target_dir='C:/Users/ssd/Down

102.98* Posted at: 1 day ago 👁13

Dubbing Error [Gemini 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 0xc6 in position 43: invalid continuation byte

TaskCfg(cache_folder='C:/Users/ssd/Downloads/win-pyvideotrans-v3.91/tmp/23444/43362cf6d9', target_dir='C:/Users/ssd/Downloads/win-pyvideotrans-v3.91/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='en', source_sub=None, target_sub='C:/Users/ssd/Desktop/capcut/video_filename.mp4', source_wav=None, source_wav_output=None, target_wav='C:/Users/ssd/Downloads/win-pyvideotrans-v3.91/output/tts/video_filename.wav', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='video_filename', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='-6%', pitch='-6%Hz', voice_rate='+22%', voice_role='Fenrir', copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=9, recogn_type=None, model_name=None, split_type=0, voice_autorate=True, video_autorate=False, cuda=False, name='C:/Users/ssd/Desktop/capcut/video_filename.mp4', basename='video_filename.mp4', ext='mp4', dirname='C:/Users/ssd/Desktop/capcut', shound_del_name=None, uuid='43362cf6d9', 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.91
frozen:True
language:en
root_dir:C:/Users/ssd/Downloads/win-pyvideotrans-v3.91

1 Replies

The error indicates a file encoding issue when the Gemini TTS engine tries to read the subtitle file for dubbing. Specifically, the subtitle file contains a byte (0xc6) that is not valid UTF-8 encoding.

This is likely because the source subtitle file (generated from your video) contains non-standard or corrupted characters. Here are the steps to fix it:

  1. Check and Clean the Source Video Filename/Path:

    • The error shows the video path is C:/Users/ssd/Desktop/capcut/video_filename.mp4. Ensure the actual filename does not contain any unusual or non-ASCII characters (like emojis, special symbols). Rename it to a simple name (e.g., video.mp4) if necessary.
  2. Regenerate with Clean Cache (Primary Solution):

    • In the main interface, before processing, check the box for Clean generated files.
    • This forces the software to regenerate the intermediate subtitle file from scratch with correct UTF-8 encoding.
  3. Manually Check/Edit the Subtitle File (if the above fails):

    • Navigate to the temporary folder shown in the error: C:/Users/ssd/Downloads/win-pyvideotrans-v3.91/tmp/23444/43362cf6d9.
    • Look for a .srt or .txt file (it might be named like video_filename.srt).
    • Open this file with a text editor like Notepad++ (not the default Windows Notepad).
    • In Notepad++, go to the Encoding menu and select Convert to UTF-8-BOM. Then save the file.
    • Alternatively, you can open the file, check for any garbled characters, remove them, and save the file as UTF-8.
  4. Change the TTS Engine (Workaround):

    • If the issue persists, switch to a different TTS engine (e.g., Edge-TTS or OpenAI TTS) for this specific video to see if the problem is isolated to Gemini TTS's file reading.

If the problem continues after trying these steps, please provide the specific subtitle file from the temporary folder for further analysis.

Please refer to the documentation for more information:

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