seperate onInput and onScreenUpdate incomming speech for prepare word echo and stuff
This commit is contained in:
parent
c95ca5b31b
commit
8ead2fc669
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
[sound]
|
[sound]
|
||||||
enabled=False,
|
enabled=False,
|
||||||
driver=sox
|
driver=sox
|
||||||
@ -5,19 +6,23 @@ theme=default
|
|||||||
|
|
||||||
[speech]
|
[speech]
|
||||||
enabled=True
|
enabled=True
|
||||||
driver=espeak
|
#driver=espeak
|
||||||
rate=800
|
#language=en-us
|
||||||
|
#voice=en-us
|
||||||
|
driver=speechd
|
||||||
|
#rate=800
|
||||||
|
rate=50
|
||||||
|
volume=100
|
||||||
pitch=50
|
pitch=50
|
||||||
module=espeak
|
module=espeak
|
||||||
voice=en-us
|
voice=de
|
||||||
language=en-us
|
language=de
|
||||||
volume=200
|
|
||||||
|
|
||||||
[braille]
|
[braille]
|
||||||
enabled=False
|
enabled=False
|
||||||
layout=en
|
layout=en
|
||||||
|
|
||||||
[screen]
|
['screen]
|
||||||
driver=linux
|
driver=linux
|
||||||
|
|
||||||
[keyboard]
|
[keyboard]
|
||||||
@ -28,3 +33,4 @@ wordEcho=True
|
|||||||
[general]
|
[general]
|
||||||
debugLevel=0
|
debugLevel=0
|
||||||
punctuationLevel=1
|
punctuationLevel=1
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class inputManager():
|
|||||||
def getKeyPressed(self, environment):
|
def getKeyPressed(self, environment):
|
||||||
timeout = True
|
timeout = True
|
||||||
try:
|
try:
|
||||||
r, w, x = select(self.devices, [], [],0.5)
|
r, w, x = select(self.devices, [], [],0.4)
|
||||||
environment['runtime']['globalLock'].acquire(True)
|
environment['runtime']['globalLock'].acquire(True)
|
||||||
if r != []:
|
if r != []:
|
||||||
timeout = False
|
timeout = False
|
||||||
|
@ -33,7 +33,8 @@ class fenrir():
|
|||||||
self.environment = self.environment['runtime']['screenDriver'].analyzeScreen(self.environment, 'onInput')
|
self.environment = self.environment['runtime']['screenDriver'].analyzeScreen(self.environment, 'onInput')
|
||||||
if not timeout:
|
if not timeout:
|
||||||
self.environment = self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onInput')
|
self.environment = self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onInput')
|
||||||
self.environment = self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onScreenChanged')
|
else:
|
||||||
|
self.environment = self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onScreenChanged')
|
||||||
if self.environment['commandInfo']['currCommand'] != '':
|
if self.environment['commandInfo']['currCommand'] != '':
|
||||||
self.environment['input']['currShortcut'] = {}
|
self.environment['input']['currShortcut'] = {}
|
||||||
self.environment['input']['currShortcutString'] = ''
|
self.environment['input']['currShortcutString'] = ''
|
||||||
@ -49,8 +50,7 @@ class fenrir():
|
|||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
|
|
||||||
def handleCommands(self):
|
def handleCommands(self):
|
||||||
if (self.environment['commandInfo']['currCommand'] != ''):# and \
|
if (self.environment['commandInfo']['currCommand'] != ''):
|
||||||
# (time.time() - self.environment['commandInfo']['lastCommandTime'] >= 0.01):
|
|
||||||
self.environment = self.environment['runtime']['commandManager'].executeCommand(self.environment, self.environment['commandInfo']['currCommand'], 'commands')
|
self.environment = self.environment['runtime']['commandManager'].executeCommand(self.environment, self.environment['commandInfo']['currCommand'], 'commands')
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user