diff --git a/setup.cfg b/setup.cfg index 2aa8e236..1af4adb1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,3 +16,5 @@ whisper-local = soundfile whisper-api = openai +assemblyai = + requests diff --git a/setup.py b/setup.py index 29c0c82e..a3bfbb41 100644 --- a/setup.py +++ b/setup.py @@ -70,5 +70,5 @@ def run(self): "Topic :: Multimedia :: Sound/Audio :: Speech", ], python_requires=">=3.9", - install_requires=['requests>=2.26.0', "typing-extensions"], + install_requires=["typing-extensions"], ) diff --git a/speech_recognition/__init__.py b/speech_recognition/__init__.py index e371ca0a..253ab0fe 100644 --- a/speech_recognition/__init__.py +++ b/speech_recognition/__init__.py @@ -25,11 +25,6 @@ from urllib.parse import urlencode from urllib.request import Request, urlopen -try: - import requests -except (ModuleNotFoundError, ImportError): - pass - from .audio import AudioData, get_flac_converter from .exceptions import ( RequestError, @@ -1260,6 +1255,8 @@ def read_file(filename, chunk_size=5242880): break yield data + import requests + check_existing = audio_data is None and job_name if check_existing: # Query status.