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

Tweak installation; Add whisper extras #740

Merged
merged 3 commits into from
Mar 30, 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
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
Loading