From e950d47ddc402b11989ce323ed1cc36cfaddc48d Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 1 Jul 2022 21:27:10 -0400 Subject: [PATCH] forgot to update vers --- TTS/engine_wrapper.py | 4 ++-- main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TTS/engine_wrapper.py b/TTS/engine_wrapper.py index 3e69d54..a06b4b9 100644 --- a/TTS/engine_wrapper.py +++ b/TTS/engine_wrapper.py @@ -6,7 +6,7 @@ from os import getenv import sox from mutagen import MutagenError -from mutagen.mp3 import MP3 +from mutagen.mp3 import MP3, HeaderNotFoundError import translators as ts from rich.progress import track from moviepy.editor import AudioFileClip, CompositeAudioClip, concatenate_audioclips @@ -96,7 +96,7 @@ class TTSEngine: self.tts_module.run(text=process_text(text), filepath=f"{self.path}/{filename}.mp3") try: self.length += MP3(f"{self.path}/{filename}.mp3").info.length - except MutagenError: + except (MutagenError, HeaderNotFoundError): self.length += sox.file_info.duration(f"{self.path}/{filename}.mp3") def process_text(text: str): diff --git a/main.py b/main.py index c85a2aa..81bec26 100755 --- a/main.py +++ b/main.py @@ -14,7 +14,7 @@ from video_creation.final_video import make_final_video from video_creation.screenshot_downloader import download_screenshots_of_reddit_posts from video_creation.voices import save_text_to_mp3 -VERSION = "2.2.1" +VERSION = "2.2.2" print( """ ██████╗ ███████╗██████╗ ██████╗ ██╗████████╗ ██╗ ██╗██╗██████╗ ███████╗ ██████╗ ███╗ ███╗ █████╗ ██╗ ██╗███████╗██████╗