Skip to content

Commit

Permalink
Merge pull request #780 from ftnext/feature/tidy-deps-requests
Browse files Browse the repository at this point in the history
Tidy dependencies: requests
  • Loading branch information
ftnext authored Nov 3, 2024
2 parents fc2cfc3 + ba6a2c6 commit a2ed0c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ whisper-local =
soundfile
whisper-api =
openai
assemblyai =
requests
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
7 changes: 2 additions & 5 deletions speech_recognition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit a2ed0c2

Please sign in to comment.