mirror of https://gitlab.com/bashrc2/epicyon
Include image description when printing to screen
parent
1640fe5ea3
commit
77a339b8c1
10
epicyon.py
10
epicyon.py
|
@ -1946,10 +1946,7 @@ if args.speaker:
|
|||
if speakerJson:
|
||||
if speakerJson['say'] != prevSay:
|
||||
if speakerJson.get('name'):
|
||||
# echo spoken text to the screen
|
||||
nameStr = speakerJson['name']
|
||||
print(html.unescape(nameStr) + ': ' +
|
||||
html.unescape(speakerJson['say']) + '\n')
|
||||
|
||||
# get the speech parameters
|
||||
pitch = getSpeakerPitch(nameStr, args.screenreader)
|
||||
|
@ -1975,9 +1972,16 @@ if args.speaker:
|
|||
# append image description if needed
|
||||
if not speakerJson.get('imageDescription'):
|
||||
sayStr = speakerJson['say']
|
||||
# echo spoken text to the screen
|
||||
print(html.unescape(nameStr) + ': ' +
|
||||
html.unescape(speakerJson['say']) + '\n')
|
||||
else:
|
||||
sayStr = speakerJson['say'] + '. ' + \
|
||||
speakerJson['imageDescription']
|
||||
# echo spoken text to the screen
|
||||
print(html.unescape(nameStr) + ': ' +
|
||||
html.unescape(speakerJson['say']) + '\n' +
|
||||
html.unescape(speakerJson['imageDescription']))
|
||||
|
||||
# speak the post content
|
||||
if args.screenreader == 'espeak':
|
||||
|
|
Loading…
Reference in New Issue