announce capitals in phonetic

This commit is contained in:
chrys
2016-10-18 10:28:48 +02:00
parent 1eed2e3479
commit db6c21625d
2 changed files with 8 additions and 2 deletions

View File

@@ -28,7 +28,9 @@ class outputManager():
if self.playSoundIcon(soundIcon, interrupt):
self.env['runtime']['debug'].writeDebugOut("soundIcon found" ,debug.debugLevel.INFO)
return
toAnnounceCapital = announceCapital and len(text.strip(' \n\t')) == 1 and text.strip(' \n\t').isupper()
if text.strip(string.whitespace) == '':
return
toAnnounceCapital = announceCapital and text[0].isupper()
if toAnnounceCapital:
if self.playSoundIcon('capital', False):
toAnnounceCapital = False