Skip to content

Commit 64247af

Browse files
authored
Merge pull request #893 from ftnext/codex/python-313-whisper-tests
Restore local Whisper test coverage on Python 3.13
2 parents e288c0d + 3a5a472 commit 64247af

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/unittests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ jobs:
4545
sudo apt-get install --no-install-recommends -y portaudio19-dev
4646
- name: Install ffmpeg (for Whisper)
4747
uses: FedericoCarboni/setup-ffmpeg@37062fbf7149fc5578d6c57e08aed62458b375d6 # v3.1
48-
- name: Install Python dependencies (Ubuntu, <=3.12)
49-
if: matrix.os == 'ubuntu-latest' && matrix.python-version != '3.13' && matrix.python-version != '3.14'
48+
- name: Install Python dependencies (Ubuntu, <=3.13)
49+
if: matrix.os == 'ubuntu-latest' && matrix.python-version != '3.14'
5050
run: |
5151
python -m pip install .[dev,audio,pocketsphinx,google-cloud,whisper-local,faster-whisper,openai,groq,vosk,cohere-api]
52-
- name: Install Python dependencies (Ubuntu, >=3.13)
53-
if: matrix.os == 'ubuntu-latest' && (matrix.python-version == '3.13' || matrix.python-version == '3.14')
52+
- name: Install Python dependencies (Ubuntu, 3.14)
53+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
5454
run: |
5555
python -m pip install .[dev,audio,pocketsphinx,google-cloud,openai,groq,vosk,cohere-api]
5656
- name: Install Python dependencies (Windows)

tests/recognizers/whisper_local/test_faster_whisper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def soundfile_read() -> Generator[tuple[MagicMock, np.ndarray], None, None]:
5252

5353

5454
@pytest.mark.skipif(
55-
sys.version_info >= (3, 13), reason="skip on Python 3.13 or later"
55+
sys.version_info >= (3, 14), reason="skip on Python 3.14 or later"
5656
)
5757
@patch("faster_whisper.WhisperModel")
5858
class TestTranscribe:

tests/recognizers/whisper_local/test_whisper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from speech_recognition.recognizers.whisper_local.whisper import recognize
99

1010

11-
@skipIf(sys.version_info >= (3, 13), "skip on Python 3.13")
11+
@skipIf(sys.version_info >= (3, 14), "skip on Python 3.14")
1212
@patch("soundfile.read")
1313
@patch("torch.cuda.is_available")
1414
@patch("whisper.load_model")

0 commit comments

Comments
 (0)