@@ -59,9 +59,9 @@ def test_apple_avspeech_voices(engine):
59
59
), f"Expected default voice { voice } to be com.apple.voice.compact.en-US.Samantha"
60
60
voices = engine .getProperty ("voices" )
61
61
# On macOS v14.x, nsss has 143 voices.
62
- # On macOS v15.x, nsss has 176 voices
62
+ # On macOS v15.x, nsss has 177 voices
63
63
print (f"On macOS v{ macos_version } , { engine } has { len (voices ) = } voices." )
64
- assert len (voices ) in ( 176 , 143 ) , "Expected 176 or 143 voices on macOS and iOS"
64
+ assert len (voices ) in { 177 , 143 } , "Expected 177 or 143 voices on macOS and iOS"
65
65
# print("\n".join(voice.id for voice in voices))
66
66
en_us_voices = [voice for voice in voices if voice .id .startswith ("com.apple.eloquence.en-US." )]
67
67
assert len (en_us_voices ) == 8 , "Expected 8 com.apple.eloquence.en-US voices on macOS and iOS"
@@ -96,9 +96,9 @@ def test_apple_nsss_voices(engine):
96
96
), "Expected default voice to be com.apple.voice.compact.en-US.Samantha on macOS and iOS"
97
97
voices = engine .getProperty ("voices" )
98
98
# On macOS v14.x, nsss has 143 voices.
99
- # On macOS v15.x, nsss has 176 voices
99
+ # On macOS v15.x, nsss has 177 voices
100
100
print (f"On macOS v{ macos_version } , { engine } has { len (voices ) = } voices." )
101
- assert len (voices ) in ( 176 , 143 ) , "Expected 176 or 143 voices on macOS and iOS"
101
+ assert len (voices ) in { 177 , 143 } , "Expected 177 or 143 voices on macOS and iOS"
102
102
# print("\n".join(voice.id for voice in voices))
103
103
en_us_voices = [voice for voice in voices if voice .id .startswith ("com.apple.eloquence.en-US." )]
104
104
assert len (en_us_voices ) == 8 , "Expected 8 com.apple.eloquence.en-US voices on macOS and iOS"
@@ -201,7 +201,7 @@ def test_changing_volume(engine) -> None:
201
201
@pytest .mark .skipif (sys .platform == "win32" , reason = "TODO: Fix this test to pass on Windows" )
202
202
def test_changing_voices (engine ) -> None :
203
203
voices = engine .getProperty ("voices" )
204
- for voice in voices : # TODO: This could be lots of voices! (e.g. 176 on macOS v15.x)
204
+ for voice in voices : # TODO: This could be lots of voices! (e.g. 177 on macOS v15.x)
205
205
engine .setProperty ("voice" , voice .id )
206
206
engine .say (f"{ voice .id = } . { quick_brown_fox } " )
207
207
engine .runAndWait ()
0 commit comments