Skip to content

Commit

Permalink
Merge pull request #787 from ftnext/refactor/pocketsphinx-extra
Browse files Browse the repository at this point in the history
Extract pocketsphinx extra
  • Loading branch information
ftnext authored Nov 4, 2024
2 parents 7614f10 + ad51005 commit c7b4cba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,15 @@ jobs:
sudo apt-get install --no-install-recommends -y portaudio19-dev
- name: Install ffmpeg (for Whisper)
uses: FedericoCarboni/setup-ffmpeg@v3
- name: Install Python dependencies (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
python -m pip install 'pocketsphinx<5'
- name: Install Python dependencies (Ubuntu, <=3.12)
if: matrix.os == 'ubuntu-latest' && matrix.python-version != '3.13'
run: |
python -m pip install .[dev,audio,whisper-local,whisper-api]
python -m pip install .[dev,audio,pocketsphinx,whisper-local,whisper-api]
- name: Install Python dependencies (Ubuntu, 3.13)
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
run: |
python -m pip install standard-aifc setuptools
python -m pip install --no-build-isolation .[dev,audio,whisper-api]
python -m pip install --no-build-isolation .[dev,audio,pocketsphinx,whisper-api]
- name: Install Python dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ PocketSphinx-Python (for Sphinx users)

PocketSphinx-Python `wheel packages <https://pypi.python.org/pypi/wheel>`__ for 64-bit Python 3.4, and 3.5 on Windows are included for convenience, under the ``third-party/`` `directory <https://github.com/Uberi/speech_recognition/tree/master/third-party>`__. To install, simply run ``pip install wheel`` followed by ``pip install ./third-party/WHEEL_FILENAME`` (replace ``pip`` with ``pip3`` if using Python 3) in the SpeechRecognition folder.

On Linux and other POSIX systems (such as OS X), follow the instructions under "Building PocketSphinx-Python from source" in `Notes on using PocketSphinx <https://github.com/Uberi/speech_recognition/blob/master/reference/pocketsphinx.rst>`__ for installation instructions.
On Linux and other POSIX systems (such as OS X), run ``pip install SpeechRecognition[pocketsphinx]``. Follow the instructions under "Building PocketSphinx-Python from source" in `Notes on using PocketSphinx <https://github.com/Uberi/speech_recognition/blob/master/reference/pocketsphinx.rst>`__ for installation instructions.

Note that the versions available in most package repositories are outdated and will not work with the bundled language data. Using the bundled wheel packages or building from source is recommended.

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ dev =
pytest-randomly
audio =
PyAudio >= 0.2.11
pocketsphinx =
pocketsphinx < 5
whisper-local =
openai-whisper
soundfile
Expand Down

0 comments on commit c7b4cba

Please sign in to comment.