Skip to content

Commit 02a2c4e

Browse files
committed
removed ',' processing leftover from MathPlayer nagivation. MathCAT properly adds pausing
1 parent 05909a4 commit 02a2c4e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

NVDA-addon/addon/globalPlugins/MathCAT/MathCAT.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,8 @@
5454
r"|<audio src='(?P<beep>beep.mp4)'>.*?</audio> ?" # hack for beeps
5555
# Other tags, which we don't care about.
5656
r"|<[^>]+> ?"
57-
# Commas indicating pauses in navigation messages.
58-
r"| ?(?P<comma>,) ?"
5957
# Actual content.
60-
r"|(?P<content>[^<,]+)")
58+
r"|(?P<content>[^<]+)")
6159

6260
PROSODY_COMMANDS = {
6361
"pitch": PitchCommand,
@@ -68,6 +66,7 @@
6866
def ConvertSSMLTextForNVDA(text:str, language:str=""):
6967
# MathCAT's default rate is 180 wpm.
7068
# Assume that 0% is 80 wpm and 100% is 450 wpm and scale accordingly.
69+
# log.info("Speech str: '{}'".format(text))
7170
synth = getSynth()
7271
wpm = synth._percentToParam(synth.rate, 80, 450)
7372
breakMulti = 180.0 / wpm
@@ -91,9 +90,6 @@ def ConvertSSMLTextForNVDA(text:str, language:str=""):
9190
out.extend((CharacterModeCommand(True), ch, CharacterModeCommand(False)))
9291
else:
9392
out.extend((" ", ch, " "))
94-
elif m.lastgroup == "comma":
95-
if use_break:
96-
out.append(BreakCommand(time=100))
9793
elif m.lastgroup == "beep":
9894
out.append(BeepCommand(2000, 50))
9995
elif m.lastgroup == "pitch":
@@ -120,6 +116,7 @@ def ConvertSSMLTextForNVDA(text:str, language:str=""):
120116
out.extend((" ", m.group(0), " "))
121117
if language:
122118
out.append(LangChangeCommand(None))
119+
# log.info("Speech commands: '{}'".format(out))
123120
return out
124121

125122
class MathCATInteraction(mathPres.MathInteractionNVDAObject):

0 commit comments

Comments
 (0)