Skip to content

Commit

Permalink
Merge pull request #740 from ftnext/tweak-whisper-extra
Browse files Browse the repository at this point in the history
Tweak installation; Add whisper extras
  • Loading branch information
ftnext authored Mar 30, 2024
2 parents 9194a47 + 863b10a commit 0799b16
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -178,7 +178,7 @@ The library `openai <https://pypi.org/project/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
---------------
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
universal=1

[options.extras_require]
whisper-local =
openai-whisper
soundfile
whisper-api =
openai

0 comments on commit 0799b16

Please sign in to comment.