Skip to content

Commit

Permalink
Add warning when skip synthesis and batch both enabled
Browse files Browse the repository at this point in the history
Now throws a descriptive error when script is set to skip synthesis while batch mode is enabled. This cannot be done because it pulls the audio files from the workingFolder, which can only contain one language's worth of files at once.
  • Loading branch information
ThioJoe committed Dec 14, 2023
1 parent 354118a commit 411b514
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Scripts/shared_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
for section in cloudConfigRaw.sections():
for key in cloudConfigRaw[section]:
cloudConfig[key] = parseConfigSetting(cloudConfigRaw[section][key])

# ----- Validation Checks ------ (Add these to their own file eventually)
if config['skip_synthesize'] == True and cloudConfig['batch_tts_synthesize'] == True:
raise ValueError(f'\nERROR: Cannot skip voice synthesis when batch mode is enabled. Please disable batch_tts_synthesize or set skip_synthesize to False.')


# ----- Create constants ------
ORIGINAL_VIDEO_PATH = batchConfig['SETTINGS']['original_video_file_path']
Expand Down

0 comments on commit 411b514

Please sign in to comment.