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
6260PROSODY_COMMANDS = {
6361 "pitch" : PitchCommand ,
6866def 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
125122class MathCATInteraction (mathPres .MathInteractionNVDAObject ):
0 commit comments