Skip to content

Commit

Permalink
v1.6.6 forcing pyttsx3 using sapi5 for win32 systems, on other platfo…
Browse files Browse the repository at this point in the history
…rms espeak-ng
  • Loading branch information
mccool committed Dec 29, 2022
1 parent eb24f24 commit 6c5de06
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/tools/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def instFiles():
'--workpath', builddir,
'--onefile',
'--windowed',
'--name', 'spyglass-1.6.6-RC04',
'--name', 'spyglass-1.6.6',
'../spyglass.py',
'--icon=../icon.ico',
'--add-data=../vi/universe/*.json;./vi/universe',
Expand Down
6 changes: 3 additions & 3 deletions src/vi/soundmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, *args, **kwargs):
self.start()

def run(self):
tts_engine = pyttsx3.init("espeak-ng")
tts_engine = pyttsx3.init("sapi5" if sys.platform.startswith("win32") else "espeak-ng")
tts_engine.setProperty('volume', self.soundVolume)
tts_engine.say(self._args)
tts_engine.runAndWait()
Expand Down Expand Up @@ -95,8 +95,8 @@ class SoundManager(metaclass=Singleton):

def __init__(self):
try:
if PYTTSX3_ENABLED and not sys.platform.startswith("linux"):
self.speach_engine = pyttsx3.init()
if PYTTSX3_ENABLED and sys.platform.startswith("win32"):
self.speach_engine = pyttsx3.init("sapi5")
for voice in self.speach_engine.getProperty('voices'):
print(voice)
if "_EN-US" in voice.id:
Expand Down
4 changes: 2 additions & 2 deletions src/vi/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION = "1.6.6-RC04"
SNAPSHOT = True # set to false when releasing
VERSION = "1.6.6"
SNAPSHOT = False # set to false when releasing

0 comments on commit 6c5de06

Please sign in to comment.