feat(audio_prompts): add default audio prompts for narrator

feat(audio_prompts): add en_narrator_deep audio prompt for narrator
feat(audio_prompts): add en_narrator_light_bg audio prompt for narrator
fix(video.py): fix indentation and add prompt for generating thumbnail
fix(montage.py): fix indentation and add prompt for generating thumbnail
fix(montage.py): fix image download for wikimage slides

fix(speak.py): remove unused import statement
fix(speak.py): remove unused variable 'fakenames'
feat(speak.py): add function 'remove_blank_moments' to remove silent parts from audio file
feat(speak.py): add function 'optimize_string_groups' to optimize string groups for audio generation
fix(speak.py): fix comment indentation in 'generate_voice' function
fix(speak.py): remove unused imports in 'generate_voice' function
fix(speak.py): remove unused variable 'reduced_noise' in 'generate_voice' function
fix(speak.py): remove unused import statements in 'generate_voice' function
fix(speak.py): remove unused import statement for 'logging' module
fix(speak.py): remove unused print statements in 'main' function
fix(speak.py): remove unused import statement for 'logging' module
fix(speak.py): remove unused print statements in 'main' function
fix(speak.py):

fix(wiki_downloader.py): fix Google search URL to include correct query parameter
fix(wiki_downloader.py): reduce sleep time after page load to 1 second
fix(wiki_downloader.py): increase sleep time after image click to 5 seconds
This commit is contained in:
Paillat
2023-07-02 11:17:10 +02:00
parent f1de2ad596
commit f7835f6604
13 changed files with 206 additions and 114 deletions

View File

@@ -48,7 +48,7 @@ class Video:
script = await generate_script(self.idea['title'], self.idea['description'])
script = json.loads(script)
with open(os.path.join( self.path, "script.json"), "w") as f:
json.dump(script, f)
json.dump(script, f, indent=4)
f.close()
else:
with open(os.path.join(self.path, "script.json"), "r") as f:
@@ -60,7 +60,8 @@ class Video:
"title": self.idea['title'],
"description": self.idea['description'] + "\n\n" + credits,
}
await generate_thumbnail( self.path, self.idea['title'], self.idea['description'])
if input("Do you want to generate a thumbnail ? (y/N) : ").lower() == "y":
await generate_thumbnail( self.path, self.idea['title'], self.idea['description'])
videoid = await upload_video( self.path, self.idea['title'], self.metadata['description'], 28, "", "private", self.parent.path)
printm(f"Your video is ready! You can find it in { self.path}")
video_meta_file = {