Skip to content

Commit 0799b16

Browse files
authored
Merge pull request #740 from ftnext/tweak-whisper-extra
Tweak installation; Add whisper extras
2 parents 9194a47 + 863b10a commit 0799b16

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/unittests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ jobs:
3131
- name: Install Python dependencies
3232
run: |
3333
python -m pip install 'pocketsphinx<5'
34-
python -m pip install openai-whisper soundfile
35-
python -m pip install openai
36-
python -m pip install .
34+
python -m pip install .[whisper-local,whisper-api]
3735
- name: Test with unittest
3836
run: |
3937
python -m doctest speech_recognition/recognizers/google.py -v

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Whisper (for Whisper users)
169169
~~~~~~~~~~~~~~~~~~~~~~~~~~~
170170
Whisper is **required if and only if you want to use whisper** (``recognizer_instance.recognize_whisper``).
171171

172-
You can install it with ``python3 -m pip install openai-whisper soundfile``.
172+
You can install it with ``python3 -m pip install SpeechRecognition[whisper-local]``.
173173

174174
Whisper API (for Whisper API users)
175175
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -178,7 +178,7 @@ The library `openai <https://pypi.org/project/openai/>`__ is **required if and o
178178

179179
If not installed, everything in the library will still work, except calling ``recognizer_instance.recognize_whisper_api`` will raise an ``RequestError``.
180180

181-
You can install it with ``python3 -m pip install openai``.
181+
You can install it with ``python3 -m pip install SpeechRecognition[whisper-api]``.
182182

183183
Troubleshooting
184184
---------------

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
universal=1
55

66
[options.extras_require]
7+
whisper-local =
8+
openai-whisper
9+
soundfile
710
whisper-api =
811
openai

0 commit comments

Comments
 (0)