diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index e12d6609..01ede18f 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -31,9 +31,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install 'pocketsphinx<5' - python -m pip install openai-whisper soundfile - python -m pip install openai - python -m pip install . + python -m pip install .[whisper-local,whisper-api] - name: Test with unittest run: | python -m doctest speech_recognition/recognizers/google.py -v diff --git a/README.rst b/README.rst index d86ba5bf..50cae061 100644 --- a/README.rst +++ b/README.rst @@ -169,7 +169,7 @@ Whisper (for Whisper users) ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Whisper is **required if and only if you want to use whisper** (``recognizer_instance.recognize_whisper``). -You can install it with ``python3 -m pip install openai-whisper soundfile``. +You can install it with ``python3 -m pip install SpeechRecognition[whisper-local]``. Whisper API (for Whisper API users) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -178,7 +178,7 @@ The library `openai `__ is **required if and o If not installed, everything in the library will still work, except calling ``recognizer_instance.recognize_whisper_api`` will raise an ``RequestError``. -You can install it with ``python3 -m pip install openai``. +You can install it with ``python3 -m pip install SpeechRecognition[whisper-api]``. Troubleshooting --------------- diff --git a/setup.cfg b/setup.cfg index 69c937c4..d2fa6c02 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,5 +4,8 @@ universal=1 [options.extras_require] +whisper-local = + openai-whisper + soundfile whisper-api = openai