mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Various changes related to generalization and persistance.
This commit is contained in:
parent
12541f3de3
commit
ebcd5720b0
@ -1,9 +1,9 @@
|
|||||||
from base import Output, OutputError
|
from base import Output, OutputError
|
||||||
import atexit
|
import atexit
|
||||||
|
import application
|
||||||
class SpeechDispatcher(Output):
|
class SpeechDispatcher(Output):
|
||||||
"""Supports speech dispatcher on Linux.
|
"""Supports speech dispatcher on Linux.
|
||||||
Note that it will take the configuration from the speech dispatcher, the user will need configure voice, language, punctuation and rate before use this module.
|
Note that this module will use the configuration of speech dispatcher, the user will need to configure the voice, language, punctuation and rate before using this module.
|
||||||
"""
|
"""
|
||||||
name = 'SpeechDispatcher'
|
name = 'SpeechDispatcher'
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ class SpeechDispatcher(Output):
|
|||||||
super(SpeechDispatcher, self).__init__(*args, **kwargs)
|
super(SpeechDispatcher, self).__init__(*args, **kwargs)
|
||||||
try:
|
try:
|
||||||
import speechd
|
import speechd
|
||||||
self.spd = speechd.SSIPClient("TWBlue")
|
self.spd = speechd.SSIPClient(application.name)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise OutputError
|
raise OutputError
|
||||||
atexit.register(self.on_exit_event)
|
atexit.register(self.on_exit_event)
|
||||||
|
@ -374,4 +374,3 @@ class Session(object):
|
|||||||
for key,value in shelf.items():
|
for key,value in shelf.items():
|
||||||
self.db[key]=value
|
self.db[key]=value
|
||||||
shelf.close()
|
shelf.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user