seperate onInput and onScreenUpdate incomming speech for prepare word echo and stuff

This commit is contained in:
chrys 2016-07-23 17:07:55 +02:00
parent c95ca5b31b
commit 8ead2fc669
3 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,4 @@
[sound]
enabled=False,
driver=sox
@ -5,19 +6,23 @@ theme=default
[speech]
enabled=True
driver=espeak
rate=800
#driver=espeak
#language=en-us
#voice=en-us
driver=speechd
#rate=800
rate=50
volume=100
pitch=50
module=espeak
voice=en-us
language=en-us
volume=200
voice=de
language=de
[braille]
enabled=False
layout=en
[screen]
['screen]
driver=linux
[keyboard]
@ -28,3 +33,4 @@ wordEcho=True
[general]
debugLevel=0
punctuationLevel=1

View File

@ -13,7 +13,7 @@ class inputManager():
def getKeyPressed(self, environment):
timeout = True
try:
r, w, x = select(self.devices, [], [],0.5)
r, w, x = select(self.devices, [], [],0.4)
environment['runtime']['globalLock'].acquire(True)
if r != []:
timeout = False

View File

@ -33,6 +33,7 @@ class fenrir():
self.environment = self.environment['runtime']['screenDriver'].analyzeScreen(self.environment, 'onInput')
if not timeout:
self.environment = self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onInput')
else:
self.environment = self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onScreenChanged')
if self.environment['commandInfo']['currCommand'] != '':
self.environment['input']['currShortcut'] = {}
@ -49,8 +50,7 @@ class fenrir():
time.sleep(0.5)
def handleCommands(self):
if (self.environment['commandInfo']['currCommand'] != ''):# and \
# (time.time() - self.environment['commandInfo']['lastCommandTime'] >= 0.01):
if (self.environment['commandInfo']['currCommand'] != ''):
self.environment = self.environment['runtime']['commandManager'].executeCommand(self.environment, self.environment['commandInfo']['currCommand'], 'commands')
def shutdown(self):