Added setting readNumbersAsDigits.

This commit is contained in:
Storm Dragon
2024-03-13 00:56:53 -04:00
parent a7b28af947
commit c3d1ccd10b
11 changed files with 30 additions and 1 deletions

View File

@ -27,6 +27,8 @@ class outputManager():
def presentText(self, text, interrupt=True, soundIcon = '', ignorePunctuation=False, announceCapital=False, flush=True, brailleAlternative = ''):
if text == '':
return
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'readNumbersAsDigits'):
text = re.sub(r"(\d)", r"\1 ", text).rstrip()
self.env['runtime']['debug'].writeDebugOut("presentText:\nsoundIcon:'"+soundIcon+"'\nText:\n" + text ,debug.debugLevel.INFO)
if self.playSoundIcon(soundIcon, interrupt):
self.env['runtime']['debug'].writeDebugOut("soundIcon found" ,debug.debugLevel.INFO)

View File

@ -27,6 +27,7 @@ settingsData = {
'voice': 'en-us',
'language': '',
'autoReadIncoming': True,
'readNumbersAsDigits': False,
'genericSpeechCommand':'espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"',
'fenrirMinVolume':0,
'fenrirMaxVolume':200,