Skip to content

Commit a9d8803

Browse files
committed
version 20.02B2
fix now NVDA won-t stop from talking if the current device number is not present, E.G. if a soundcard is disconnected. This issue is present on all NVDA-s synth drivers. add more crashing fixes. fix now IBMTTS can load dictionaries properly.
1 parent 9e51965 commit a9d8803

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

addon/synthDrivers/_ibmeci.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ def setLast(lp):
225225
onIndexReached(lp)
226226

227227
def bgPlay(stri):
228-
if len(stri) == 0: return
228+
global player
229+
if not player or len(stri) == 0: return
229230
# Sometimes player.feed() tries to open the device when it's already open,
230231
# causing a WindowsError. This code catches and works around this.
231232
# [DGL, 2012-12-18 with help from Tyler]
@@ -236,6 +237,10 @@ def bgPlay(stri):
236237
if tries > 0:
237238
log.warning("Eloq speech retries: %d" % (tries))
238239
return
240+
except FileNotFoundError:
241+
# reset the player if the used soundcard is not present. E.G. the total number of sound devices has changed.
242+
player.close()
243+
player = nvwave.WavePlayer(1, 11025, 16, outputDevice=config.conf["speech"]["outputDevice"])
239244
except:
240245
player.idle()
241246
time.sleep(0.02)

buildVars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
2020
"addon_description" : _("""This is the IBMTTS synthesizer driver for NVDA."""),
2121
# version
22-
"addon_version" : "20.02B1",
22+
"addon_version" : "20.02B2",
2323
# Author(s)
2424
"addon_author" : u"David CM <dhf360@gmail.com> and others",
2525
# URL for the add-on documentation support

0 commit comments

Comments
 (0)