Only echo to screen if screen reader is active

merge-requests/30/head
Bob Mottram 2021-03-09 21:29:02 +00:00
parent afb63b068e
commit c486d56535
1 changed files with 8 additions and 6 deletions

View File

@ -218,6 +218,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
# append image description if needed
if not speakerJson.get('imageDescription'):
sayStr = speakerJson['say']
if screenreader:
# echo spoken text to the screen
print(html.unescape(nameStr) + ': ' +
html.unescape(speakerJson['say']) + '\n')
@ -227,9 +228,10 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
# echo spoken text to the screen
imageDescription = \
html.unescape(speakerJson['imageDescription'])
if screenreader:
print(html.unescape(nameStr) + ': ' +
html.unescape(speakerJson['say']) + '\n' +
imageDescription)
html.unescape(speakerJson['say']) +
'\n' + imageDescription)
# speak the post content
if screenreader == 'espeak':