tell the TTS system the pause without messinng config files

This commit is contained in:
chrys 2016-10-18 14:03:10 +02:00
parent d8f4446ab0
commit fe264e8d96
5 changed files with 14 additions and 6 deletions

View File

@ -15,13 +15,13 @@ all:===:!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~
@:===:at @:===:at
\:===:backslash \:===:backslash
|:===:bar |:===:bar
!:===:bang! !:===:bang
^:===:carrot ^:===:carrot
::===:colon: ::===:colon
,:===:comma, ,:===:comma
-:===:dash -:===:dash
$:===:dollar $:===:dollar
.:===:dot. .:===:dot
>:===:greater >:===:greater
`:===:grave `:===:grave
#:===:hash #:===:hash
@ -36,7 +36,7 @@ $:===:dollar
):===:right paren ):===:right paren
}:===:right brace }:===:right brace
]:===:right bracket ]:===:right bracket
;:===:semicolon; ;:===:semicolon
/:===:slash /:===:slash
*:===:star *:===:star
~:===:tilde ~:===:tilde

View File

@ -99,6 +99,7 @@ doubleTapTimeout=0.2
debugLevel=0 debugLevel=0
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True
numberOfClipboards=10 numberOfClipboards=10
emoticons=True emoticons=True
# define the current fenrir key # define the current fenrir key

View File

@ -50,6 +50,7 @@ doubleTapTimeout=0.2
debugLevel=0 debugLevel=0
punctuationProfile=default punctuationProfile=default
punctuationLevel=some punctuationLevel=some
respectPunctuationPause=True
numberOfClipboards=10 numberOfClipboards=10
emoticons=True emoticons=True
fenrirKeys=KEY_KP0 fenrirKeys=KEY_KP0

View File

@ -43,7 +43,12 @@ class punctuationManager():
if punctuationDict and punctuation and punctuation != '': if punctuationDict and punctuation and punctuation != '':
for key,item in punctuationDict.items(): for key,item in punctuationDict.items():
if key in punctuation: if key in punctuation:
resultText = resultText.replace(str(key),' ' +str(item) +' ') if self.env['runtime']['settingsManager'].getSetting('general', 'respectPunctuationPause') and \
len(key) == 1 and \
key in string.punctuation:
resultText = resultText.replace(str(key),' ' +str(item) + str(key) + ' ')
else:
resultText = resultText.replace(str(key),' ' +str(item) + ' ')
return resultText return resultText
def proceedPunctuation(self, text, ignorePunctuation=False): def proceedPunctuation(self, text, ignorePunctuation=False):

View File

@ -43,6 +43,7 @@ settings = {
'debugLevel': debug.debugLevel.DEACTIVE, 'debugLevel': debug.debugLevel.DEACTIVE,
'punctuationProfile':'default', 'punctuationProfile':'default',
'punctuationLevel': 'some', 'punctuationLevel': 'some',
'respectPunctuationPause':True,
'numberOfClipboards': 10, 'numberOfClipboards': 10,
'emoticons': True, 'emoticons': True,
'fenrirKeys': ['KEY_KP0','KEY_META'], 'fenrirKeys': ['KEY_KP0','KEY_META'],