add debut to speech-drivers
This commit is contained in:
parent
141377b7b8
commit
483fd21952
@ -34,7 +34,7 @@ class driver():
|
||||
currScreen = self.env['screenData']['newTTY']
|
||||
apps = subprocess.Popen('ps -t tty' + currScreen + ' -o comm,tty,stat', shell=True, stdout=subprocess.PIPE).stdout.read().decode()[:-1].split('\n')
|
||||
except Exception as e:
|
||||
print(e)
|
||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||
return
|
||||
try:
|
||||
for i in apps:
|
||||
|
@ -11,14 +11,17 @@ class driver():
|
||||
def __init__(self ):
|
||||
self._es = None
|
||||
self._isInitialized = False
|
||||
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
try:
|
||||
from espeak import espeak
|
||||
self._es = espeak
|
||||
self._isInitialized = True
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||
self._initialized = False
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
|
||||
def shutdown(self):
|
||||
pass
|
||||
|
||||
|
@ -12,15 +12,18 @@ class driver():
|
||||
self._sd = None
|
||||
self._isInitialized = False
|
||||
self._language = ''
|
||||
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
try:
|
||||
import speechd
|
||||
self._sd = speechd.SSIPClient('fenrir')
|
||||
self._punct = speechd.PunctuationMode()
|
||||
self._isInitialized = True
|
||||
except:
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||
self._initialized = False
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
|
||||
def shutdown(self):
|
||||
if not self._isInitialized:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user