announce capitals in phonetic
This commit is contained in:
parent
1eed2e3479
commit
db6c21625d
@ -28,7 +28,9 @@ class outputManager():
|
|||||||
if self.playSoundIcon(soundIcon, interrupt):
|
if self.playSoundIcon(soundIcon, interrupt):
|
||||||
self.env['runtime']['debug'].writeDebugOut("soundIcon found" ,debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut("soundIcon found" ,debug.debugLevel.INFO)
|
||||||
return
|
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 toAnnounceCapital:
|
||||||
if self.playSoundIcon('capital', False):
|
if self.playSoundIcon('capital', False):
|
||||||
toAnnounceCapital = False
|
toAnnounceCapital = False
|
||||||
|
@ -85,6 +85,10 @@ def getPhonetic(currChar):
|
|||||||
"Y":"yankee", "Z":"zulu"
|
"Y":"yankee", "Z":"zulu"
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
return phoneticsDict[currChar.upper()]
|
phonChar = phoneticsDict[currChar.upper()]
|
||||||
|
if currChar.isupper():
|
||||||
|
phonChar = phonChar[0].upper() + phonChar[1:]
|
||||||
|
return phonChar
|
||||||
except:
|
except:
|
||||||
return currChar
|
return currChar
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user