add lock, initial outputManager
This commit is contained in:
@@ -3,13 +3,25 @@
|
||||
class outputManager():
|
||||
def __init__(self):
|
||||
pass
|
||||
def presentText(self, environment, Text):
|
||||
pass
|
||||
def speakText(self, environment, Text):
|
||||
pass
|
||||
def presentText(self, environment, Text, Interrupt=True):
|
||||
self.speakText(environment, Text, Interrupt)
|
||||
self.brailleText(environment, Text)
|
||||
|
||||
def speakText(self, environment, Text, Interrupt=True):
|
||||
if environment['runtime']['speechDriver'] == None:
|
||||
return
|
||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled'):
|
||||
return
|
||||
if Interrupt:
|
||||
self.interruptOutput(environment)
|
||||
environment['runtime']['speechDriver'].speak(Text)
|
||||
|
||||
def brailleText(self, environment, Text):
|
||||
pass
|
||||
def interruptOutput(self, environment, Text):
|
||||
pass
|
||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braile', 'enabled'):
|
||||
return
|
||||
print('braille')
|
||||
def interruptOutput(self, environment):
|
||||
environment['runtime']['speechDriver'].cancel()
|
||||
|
||||
def playSoundIcon(self, environment, Text):
|
||||
pass
|
||||
|
Reference in New Issue
Block a user