Skip to content

Commit 8cc840f

Browse files
authored
Test macOS 26 (180 voices) on the current Python release (#436)
* Test on macOS 26 Add macOS support for Python version 3.x in CI workflow. * macOS v26 ahs 180 voices * Update voice count assertion for macOS versions * Update voice count assertion for macOS versions
1 parent 86489cd commit 8cc840f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.github/workflows/python_publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
exclude: # https://github.com/nateshmbhat/pyttsx3/pull/430
3434
- os: windows-latest
3535
python-version: '3.14t'
36+
include:
37+
- os: macos-26
38+
python-version: '3.x'
3639
runs-on: ${{ matrix.os }}
3740
steps:
3841
- if: runner.os == 'Linux'

tests/test_engines.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ def test_apple_nsss_voices(driver_name) -> None:
116116
voices = engine.getProperty("voices")
117117
# On macOS v13.x or v14.x, nsss has 143 voices.
118118
# On macOS v15.x, nsss has 177 voices
119+
# On macOS v26.x, nsss has 180 voices
119120
print(f"On macOS v{macos_version}, {engine} has {len(voices) = } voices.")
120-
assert len(voices) in {177, 143}, "Expected 177 or 143 voices on macOS and iOS"
121+
assert len(voices) in {180, 177, 143}, "Expected 180 or 177 or 143 voices on macOS and iOS"
121122
# print("\n".join(voice.id for voice in voices))
122123
en_us_voices = [voice for voice in voices if voice.id.startswith("com.apple.eloquence.en-US.")]
123124
assert len(en_us_voices) == 8, "Expected 8 com.apple.eloquence.en-US voices on macOS and iOS"

tests/test_pyttsx3.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ def test_apple_avspeech_voices(engine):
6060
voices = engine.getProperty("voices")
6161
# On macOS v14.x, nsss has 143 voices.
6262
# On macOS v15.x, nsss has 177 voices
63+
# On macOS v26.x, nsss has 180 voices
6364
print(f"On macOS v{macos_version}, {engine} has {len(voices) = } voices.")
64-
assert len(voices) in {177, 143}, "Expected 177 or 143 voices on macOS and iOS"
65+
assert len(voices) in {180, 177, 143}, "Expected 180 or 177 or 143 voices on macOS and iOS"
6566
# print("\n".join(voice.id for voice in voices))
6667
en_us_voices = [voice for voice in voices if voice.id.startswith("com.apple.eloquence.en-US.")]
6768
assert len(en_us_voices) == 8, "Expected 8 com.apple.eloquence.en-US voices on macOS and iOS"
@@ -97,8 +98,9 @@ def test_apple_nsss_voices(engine):
9798
voices = engine.getProperty("voices")
9899
# On macOS v14.x, nsss has 143 voices.
99100
# On macOS v15.x, nsss has 177 voices
101+
# On macOS v26.x, nsss has 180 voices
100102
print(f"On macOS v{macos_version}, {engine} has {len(voices) = } voices.")
101-
assert len(voices) in {177, 143}, "Expected 177 or 143 voices on macOS and iOS"
103+
assert len(voices) in {180, 177, 143}, "Expected 180 or 177 or 143 voices on macOS and iOS"
102104
# print("\n".join(voice.id for voice in voices))
103105
en_us_voices = [voice for voice in voices if voice.id.startswith("com.apple.eloquence.en-US.")]
104106
assert len(en_us_voices) == 8, "Expected 8 com.apple.eloquence.en-US voices on macOS and iOS"

0 commit comments

Comments
 (0)