File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# A part of NonVisual Desktop Access (NVDA)
33# This file is covered by the GNU General Public License.
44# See the file COPYING for more details.
5- # Copyright (C) 2014-2022 NV Access Limited
5+ # Copyright (C) 2014-2023 NV Access Limited, Cyrille Bougot
66
77"""Support for math presentation using MathPlayer 4.
88"""
2020from keyboardHandler import KeyboardInputGesture
2121import braille
2222import mathPres
23+ import config
2324
2425from speech .commands import (
2526 PitchCommand ,
@@ -68,7 +69,10 @@ def _processMpSpeech(text, language):
6869 if m .lastgroup == "break" :
6970 out .append (BreakCommand (time = int (m .group ("break" )) * breakMulti ))
7071 elif m .lastgroup == "char" :
71- out .extend ((CharacterModeCommand (True ), m .group ("char" ), CharacterModeCommand (False )))
72+ if config .conf ["speech" ][synth .name ]["useSpellingFunctionality" ]:
73+ out .extend ((CharacterModeCommand (True ), m .group ("char" ), CharacterModeCommand (False )))
74+ else :
75+ out .append (m .group ("char" ))
7276 elif m .lastgroup == "comma" :
7377 out .append (BreakCommand (time = 100 ))
7478 elif m .lastgroup in PROSODY_COMMANDS :
Original file line number Diff line number Diff line change 1111
1212import characterProcessing
1313from logHandler import log
14+ from synthDriverHandler import getSynth
15+ import config
1416
1517from .commands import CharacterModeCommand
1618from .types import SpeechSequence
@@ -91,6 +93,9 @@ def _getKeySpeech(key: str) -> SpeechSequence:
9193 keySymbol = characterProcessing .processSpeechSymbol (locale , key )
9294 if keySymbol != key :
9395 return [keySymbol ]
96+ synth = getSynth ()
97+ if not config .conf ["speech" ][synth .name ]["useSpellingFunctionality" ]:
98+ return [key ]
9499 return [
95100 CharacterModeCommand (True ),
96101 key ,
You can’t perform that action at this time.
0 commit comments