Skip to content

Commit

Permalink
Fix SAPI5 synthesizers missing some messages (PR #11586)
Browse files Browse the repository at this point in the history
Fix for someSAPI5 sy
  • Loading branch information
dawidpieper committed Sep 22, 2020
1 parent fb5473e commit de18dc1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions source/synthDrivers/sapi5.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: UTF-8 -*-
#synthDrivers/sapi5.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2017 NV Access Limited, Peter Vágner, Aleksey Sadovoy
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
# synthDrivers/sapi5.py
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2006-2020 NV Access Limited, Peter Vágner, Aleksey Sadovoy
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.

import locale
from collections import OrderedDict
Expand Down Expand Up @@ -364,6 +364,11 @@ def outputTags():
tagsChanged[0] = True
outputTags()

# Some SAPI5 synthesizers complete speech sequence just after the last text is said
# and ignore any indexes passed afterward.
# Therefore we add the pause of 1ms at the end of each sequence.
textList.append('<silence msec="1" />')
# Join textList to create xml document passed to synthesizer
text = "".join(textList)
flags = constants.SVSFIsXML | constants.SVSFlagsAsync
self.tts.Speak(text, flags)
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ The existence of marked (highlighted) content can be reported in browsers, and t
- NVDA will no longer freeze or exit when holding down control+shift+downArrow in Microsoft Word. (#9463)
- The expanded / collapsed state of directories in the navigation treeview on drive.google.com is now always reported by NVDA. (#11520)
- NVDA will auto detect the NLS eReader Humanware braille display via Bluetooth as its Bluetooth name is now "NLS eReader Humanware". (#11561)
- Certain SAPI5 voices (such as Ivona) no longer skip speech. (#10901)


== Changes For Developers ==
Expand Down

0 comments on commit de18dc1

Please sign in to comment.