Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy dependencies: requests #780

Merged
merged 1 commit into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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