Skip to content

Commit 82b7589

Browse files
committed
Fix: #94 -- a divide my zero error.
I set the minimum WPM to be 10 -- that is very slow.
1 parent 36d96dc commit 82b7589

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addon/globalPlugins/MathCAT/MathCAT.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ def convertSSMLTextForNVDA(text: str) -> list[str | SpeechCommand]:
146146
_monkeyPatchESpeak()
147147

148148
synth: SynthDriver = getSynth()
149-
# I tried the engines on a 180 word excerpt. The speeds do not change linearly and differ a it between engines
149+
# I tried the engines on a 180 word excerpt. The speeds do not change linearly and differ a bit between engines
150150
# At "50" espeak finished in 46 sec, sapi in 75 sec, and one core in 70; at '100' one core was much slower than the others
151-
wpm: int = 2 * getSynth()._get_rate()
151+
wpm: int = max(10, 2 * getSynth()._get_rate())
152152
breakMulti: float = 180.0 / wpm
153153
supportedCommands: set[Type["SynthCommand"]] = synth.supportedCommands
154154
useBreak: bool = BreakCommand in supportedCommands

0 commit comments

Comments
 (0)