Skip to content

Commit

Permalink
Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Dec 9, 2024
1 parent b19f2a1 commit ddb54d4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
32 changes: 13 additions & 19 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- os: macos-latest
python-version: "3.13"
- os: windows-latest
python-version: "3.12" # Python 3.13 fails on Windows
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- os: macos-latest
python-version: "3.13"
- os: windows-latest
python-version: "3.13"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -36,25 +36,19 @@ jobs:
- name: Install ffmpeg (for Whisper)
if: runner.os != 'macOS'
uses: FedericoCarboni/setup-ffmpeg@v3
- name: Install standard-aifc on Python 3.13
if: matrix.python-version == '3.13'
- name: Install ffmpeg and portaudio on macOS
if: runner.os == 'macOS'
run: |
python -m pip install standard-aifc
- name: Install Python dependencies (Ubuntu, <=3.12)
brew instell ffmpeg portaudio
python -m pip install --no-build-isolation .[dev,audio,pocketsphinx,openai,groq]
- name: Install Python dependencies (Ubuntu, Python <= 3.12)
if: runner.os == 'Linux' && matrix.python-version != '3.13'
run: |
python -m pip install .[dev,audio,pocketsphinx,whisper-local,openai,groq]
- name: Install Python dependencies (Ubuntu, 3.13)
- name: Install Python dependencies (Linux, Python 3.13)
if: runner.os == 'Linux' && matrix.python-version == '3.13'
run: |
python -m pip install setuptools
python -m pip install --no-build-isolation .[dev,audio,pocketsphinx,openai,groq]
- name: Install Python dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install portaudio
python -m pip install setuptools
python -m pip install --no-build-isolation .[dev,audio,openai,groq]
- name: Install Python dependencies (Windows)
if: runner.os == 'Windows'
run: |
Expand Down
2 changes: 1 addition & 1 deletion tests/test_special_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def setUp(self):
self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
self.addTypeEqualityFunc(str, self.assertSameWords)

@unittest.skipIf(sys.platform.startswith(("darwin", "win")), "skip on macOS and Windows")
@unittest.skipIf(sys.platform.startswith("win"), "skip on Windows")
def test_sphinx_keywords(self):
r = sr.Recognizer()
with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)
Expand Down

0 comments on commit ddb54d4

Please sign in to comment.