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

@ -65,6 +65,9 @@ language=en_US
# Read new text as it happens?
autoReadIncoming=True
# Speak individual numbers instead of whole string.
readNumbersAsDigits': False
# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
# fenrirText = is the text that should be spoken

View File

@ -72,7 +72,9 @@ language=en
# Read new text as it happens?
autoReadIncoming=True
# genericSpeechCommand is the command that is executed for talking
# Speak individual numbers instead of whole string.
readNumbersAsDigits': False# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
# fenrirText = is the text that should be spoken
# fenrirModule = may be the speech module like used in speech-dispatcher, not every TTY need this

View File

@ -67,6 +67,9 @@ voice=en-us
# Read new text as it happens?
autoReadIncoming=True
# Speak individual numbers instead of whole string.
readNumbersAsDigits': False
# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
# fenrirText = is the text that should be spoken

View File

@ -67,6 +67,9 @@ voice=en-us
# Read new text as it happens?
autoReadIncoming=True
# Speak individual numbers instead of whole string.
readNumbersAsDigits': False
# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
# fenrirText = is the text that should be spoken

View File

@ -68,6 +68,9 @@ volume=1.0
# Read new text as it happens?
autoReadIncoming=True
# Speak individual numbers instead of whole string.
readNumbersAsDigits': False
# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
# fenrirText = is the text that should be spoken

View File

@ -68,6 +68,9 @@ voice=0
# Read new text as it happens?
autoReadIncoming=True
# Speak individual numbers instead of whole string.
readNumbersAsDigits': False
# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
# fenrirText = is the text that should be spoken

View File

@ -68,6 +68,9 @@ voice=en-us
# Read new text as it happens?
autoReadIncoming=True
# Speak individual numbers instead of whole string.
readNumbersAsDigits': False
# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
# fenrirText = is the text that should be spoken

View File

@ -22,6 +22,9 @@ language=en-us
volume=0.6
autoReadIncoming=True
# Speak individual numbers instead of whole string.
readNumbersAsDigits': False
# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
# fenrirText = is the text that should be spoken

View File

@ -67,6 +67,9 @@ language=english-us
# Read new text as it happens?
autoReadIncoming=True
# Speak individual numbers instead of whole string.
readNumbersAsDigits': False
# genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values
# fenrirText = is the text that should be spoken

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,