mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix typechecking error on Windows
This commit is contained in:
parent
a70f8d4dd5
commit
65b8b8c69b
1 changed files with 2 additions and 2 deletions
|
@ -555,7 +555,7 @@ if is_win:
|
|||
import winsdk.windows.media.speechsynthesis as speechsynthesis # type: ignore
|
||||
|
||||
try:
|
||||
self.voice_list = speechsynthesis.SpeechSynthesizer.get_all_voices()
|
||||
self.voice_list = speechsynthesis.SpeechSynthesizer.get_all_voices() # type: ignore
|
||||
except Exception as e:
|
||||
print("winsdk tts voices unavailable:", e)
|
||||
self.voice_list = []
|
||||
|
@ -605,7 +605,7 @@ if is_win:
|
|||
|
||||
synthesizer = speechsynthesis.SpeechSynthesizer()
|
||||
|
||||
voices = speechsynthesis.SpeechSynthesizer.get_all_voices()
|
||||
voices = speechsynthesis.SpeechSynthesizer.get_all_voices() # type: ignore
|
||||
voice_match = next(filter(lambda v: v.id == voice_id, voices))
|
||||
|
||||
assert voice_match
|
||||
|
|
Loading…
Reference in a new issue