ThioJoe / Auto-Synced-Translated-Dubs

Automatically translates the text of a video based on a subtitle file, and also uses AI voice to dub the video, and synced using the subtitle's timings
GNU General Public License v3.0
1.55k stars 152 forks source link

Program crashes if no output/workingFolder dirs #20

Closed sofiadparamo closed 1 year ago

sofiadparamo commented 1 year ago

The program crashes if it finds no output or workingFolder created during execution, a common problem on first-time executions.

...
  File "Auto-Synced-Translated-Dubs\main.py", line 310, in translate_dictionary
    with open(translatedSrtFileName, 'w', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'output\\video - Spanish - es.srt'

After creating the output directory, it crashes with:

...
  File "Auto-Synced-Translated-Dubs\TTS.py", line 237, in synthesize_text_azure_batch
    for filename in os.listdir('workingFolder'):
FileNotFoundError: [WinError 3] El sistema no puede encontrar la ruta especificada: 'workingFolder'