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']
|
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')
|
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:
|
except Exception as e:
|
||||||
print(e)
|
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
for i in apps:
|
for i in apps:
|
||||||
|
@ -11,14 +11,17 @@ class driver():
|
|||||||
def __init__(self ):
|
def __init__(self ):
|
||||||
self._es = None
|
self._es = None
|
||||||
self._isInitialized = False
|
self._isInitialized = False
|
||||||
|
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
try:
|
try:
|
||||||
from espeak import espeak
|
from espeak import espeak
|
||||||
self._es = espeak
|
self._es = espeak
|
||||||
self._isInitialized = True
|
self._isInitialized = True
|
||||||
except:
|
except Exception as e:
|
||||||
|
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||||
self._initialized = False
|
self._initialized = False
|
||||||
def initialize(self, environment):
|
|
||||||
self.env = environment
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -12,15 +12,18 @@ class driver():
|
|||||||
self._sd = None
|
self._sd = None
|
||||||
self._isInitialized = False
|
self._isInitialized = False
|
||||||
self._language = ''
|
self._language = ''
|
||||||
|
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
try:
|
try:
|
||||||
import speechd
|
import speechd
|
||||||
self._sd = speechd.SSIPClient('fenrir')
|
self._sd = speechd.SSIPClient('fenrir')
|
||||||
self._punct = speechd.PunctuationMode()
|
self._punct = speechd.PunctuationMode()
|
||||||
self._isInitialized = True
|
self._isInitialized = True
|
||||||
except:
|
except Exception as e:
|
||||||
|
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||||
self._initialized = False
|
self._initialized = False
|
||||||
def initialize(self, environment):
|
|
||||||
self.env = environment
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user