fix word announcement
This commit is contained in:
parent
79c650577f
commit
22b24fcb6e
@ -6,13 +6,13 @@ volume=1.0
|
||||
|
||||
[speech]
|
||||
enabled=True
|
||||
driver=espeak
|
||||
driver=speechd
|
||||
rate=0.75
|
||||
pitch=0.5
|
||||
module=espeak
|
||||
voice=en-us
|
||||
language=en-us
|
||||
volume=1.0
|
||||
module=espeak
|
||||
voice=de
|
||||
language=de
|
||||
autoReadIncomming=True
|
||||
|
||||
[braille]
|
||||
@ -25,7 +25,7 @@ driver=linux
|
||||
[keyboard]
|
||||
device=all
|
||||
keyboardLayout=desktop
|
||||
charEcho=False
|
||||
charEcho=True
|
||||
charDeleteEcho=True
|
||||
wordEcho=True
|
||||
interruptOnKeyPress=False
|
||||
|
@ -14,6 +14,7 @@ class command():
|
||||
environment['runtime']['outputManager'].presentText(environment, "blank", soundIconName='EmptyLine', interrupt=True)
|
||||
else:
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']], True)
|
||||
|
||||
return environment
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -29,9 +29,15 @@ class command():
|
||||
# get the word
|
||||
newContent = environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']]
|
||||
x, y, currWord = word_utils.getCurrentWord(environment['screenData']['newCursor']['x'], 0, newContent)
|
||||
if not(newContent[environment['screenData']['newCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['newCursor']['x']):
|
||||
return environment
|
||||
print('word')
|
||||
# was this a typed word?
|
||||
if environment['screenData']['newDelta'] != '':
|
||||
if not(newContent[environment['screenData']['oldCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['oldCursor']['x']):
|
||||
return environment
|
||||
else:
|
||||
# or just arrow arround?
|
||||
if not(newContent[environment['screenData']['newCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['newCursor']['x']):
|
||||
return environment
|
||||
|
||||
if currWord != '':
|
||||
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)
|
||||
|
||||
|
@ -45,7 +45,7 @@ class screen():
|
||||
environment['screenData']['newCursor']['x'] = int( environment['screenData']['newContentBytes'][2])
|
||||
environment['screenData']['newCursor']['y'] = int( environment['screenData']['newContentBytes'][3])
|
||||
# analyze content
|
||||
environment['screenData']['newContentText'] = str(environment['screenData']['newContentBytes'][4:][::2].decode("ascii", "replace"))
|
||||
environment['screenData']['newContentText'] = str(environment['screenData']['newContentBytes'][4:][::2].decode("ascii", "replace")).replace('\n'," ")
|
||||
environment['screenData']['newContentAttrib'] = environment['screenData']['newContentBytes'][5:][::2]
|
||||
environment['screenData']['newContentText'] = '\n'.join(self.textWrapper.wrap(environment['screenData']['newContentText'], ))[:-2]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user