fenrir/src/fenrir-package/core/outputManager.py

28 lines
995 B
Python
Raw Normal View History

2016-07-13 05:15:19 -04:00
#!/bin/python
class outputManager():
def __init__(self):
pass
2016-07-14 17:00:02 -04:00
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)
2016-07-13 05:15:19 -04:00
def brailleText(self, environment, Text):
2016-07-14 17:00:02 -04:00
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braile', 'enabled'):
return
print('braille')
def interruptOutput(self, environment):
environment['runtime']['speechDriver'].cancel()
2016-07-13 05:15:19 -04:00
def playSoundIcon(self, environment, Text):
pass