#2444 TaskCfg(cache_folder='E:/PyvideoTrans/tmp/14960/9f2b8b7d48', target_dir='e:/pyvideotrans/output/tts', remove_noise=False

2405:4802* Posted at: 14 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='E:/PyvideoTrans/tmp/14960/9f2b8b7d48', target_dir='e:/pyvideotrans/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='vi', source_sub=None, target_sub='D:/Course/The High-Density Coloring Guide to Bring Your Ideas to Life/SECTION 03. Leaving a Powerful Impression - Depicting Volume, Materials, and Color/06-1. Depicting Various Materials 2.srt', source_wav=None, source_wav_output=None, target_wav='e:/pyvideotrans/output/tts/06-1. Depicting Various Materials 2.wav', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='06-1. Depicting Various Materials 2', 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='NamMinh(Male/VN)', 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:/Course/The High-Density Coloring Guide to Bring Your Ideas to Life/SECTION 03. Leaving a Powerful Impression - Depicting Volume, Materials, and Color/06-1. Depicting Various Materials 2.srt', basename='06-1. Depicting Various Materials 2.srt', ext='srt', dirname='D:/Course/The High-Density Coloring Guide to Bring Your Ideas to Life/SECTION 03. Leaving a Powerful Impression - Depicting Volume, Materials, and Color', shound_del_name=None, uuid='9f2b8b7d48', 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:en
root_dir:E:/PyvideoTrans

1 Replies

The error 'NoneType' object has no attribute 'seek' indicates that the software failed to load an audio file (likely the generated TTS audio) because the file path is invalid or the file is empty/corrupted. From the TaskCfg data, you are processing an SRT subtitle file (06-1. Depicting Various Materials 2.srt) to generate Vietnamese (vi) TTS audio using the NamMinh(Male/VN) voice role via Edge-TTS (tts_type=0).

The most likely cause is that the TTS process failed to generate the audio file, resulting in a missing or zero-byte file at the expected path e:/pyvideotrans/output/tts/06-1. Depicting Various Materials 2.wav.

Please follow these steps to resolve the issue:

  1. Check the TTS Output File:
    Navigate to e:/pyvideotrans/output/tts/ and check if the file 06-1. Depicting Various Materials 2.wav exists. If it exists, check its file size. If it's 0 bytes or very small, the TTS generation failed.
  2. Verify TTS Settings and Network:

    • Ensure your internet connection is stable, as Edge-TTS requires an online connection.
    • In the main interface, try clicking the "Test Voice" button next to the NamMinh(Male/VN) role to see if it can play a sample. If it fails, the voice role or TTS service might be temporarily unavailable.
  3. Reduce Concurrency and Add Delays (Primary Fix):
    Edge-TTS has rate limits. Go to Menu -> Tools -> Advanced Options.

    • In the "Dubbing Adjustments" section:

      • Set "Concurrent dubbing threads" to 1.
      • Set "Pause after dubbing (seconds)" to 3 or 5.
    • In the "Subtitle Translation Adjustments" section (if you are also translating):

      • Set "Pause after translation (seconds)" to 3.
  4. Retry with a Different Voice Role:
    Temporarily switch to a different Vietnamese voice role (e.g., ChiMai(Female/VN)) and try processing again to see if the issue is specific to the NamMinh voice.
  5. Check for Path/File Name Issues:
    Ensure the original SRT file path and name do not contain characters that might cause issues during processing. The path in your log seems valid.
  6. Provide Logs for Further Diagnosis:
    If the issue persists after the above steps, please provide the complete log file from E:/PyvideoTrans/logs/ (the most recent .log file) for a more detailed 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