diff --git a/packages/markitdown/src/markitdown/__about__.py b/packages/markitdown/src/markitdown/__about__.py index e54f3bc..21790a2 100644 --- a/packages/markitdown/src/markitdown/__about__.py +++ b/packages/markitdown/src/markitdown/__about__.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: 2024-present Adam Fourney # # SPDX-License-Identifier: MIT -__version__ = "0.1.0a4" +__version__ = "0.1.0a5" diff --git a/packages/markitdown/src/markitdown/converters/_transcribe_audio.py b/packages/markitdown/src/markitdown/converters/_transcribe_audio.py index 4a9a521..d558e46 100644 --- a/packages/markitdown/src/markitdown/converters/_transcribe_audio.py +++ b/packages/markitdown/src/markitdown/converters/_transcribe_audio.py @@ -7,20 +7,14 @@ from .._exceptions import MissingDependencyException # Save reporting of any exceptions for later _dependency_exc_info = None try: - # Suppress some deprecation warnings from the speech_recognition library + # Suppress some warnings on library import import warnings - warnings.filterwarnings( - "ignore", category=DeprecationWarning, module="speech_recognition" - ) - warnings.filterwarnings( - "ignore", - category=SyntaxWarning, - module="pydub", # TODO: Migrate away from pydub - ) - import speech_recognition as sr - - import pydub + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", category=DeprecationWarning) + warnings.filterwarnings("ignore", category=SyntaxWarning) + import speech_recognition as sr + import pydub except ImportError: # Preserve the error and stack trace for later _dependency_exc_info = sys.exc_info()