improve debug of dummy speech driver
This commit is contained in:
parent
51dd6433ea
commit
18ab70f188
@ -11,48 +11,60 @@ class driver():
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
def initialize(self, environment):
|
def initialize(self, environment):
|
||||||
self._isInitialized = False
|
self._isInitialized = True
|
||||||
self.env = environment
|
self.env = environment
|
||||||
|
pirnt('SpeechDummyDriver: Iitialize')
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
pass
|
pirnt('SpeechDummyDriver: Shutdown')
|
||||||
|
|
||||||
def speak(self,text, queueable=True):
|
def speak(self,text, queueable=True):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return False
|
return
|
||||||
if not queueable:
|
if not queueable:
|
||||||
self.cancel()
|
self.cancel()
|
||||||
|
pirnt('SpeechDummyDriver: Speak:'+text)
|
||||||
|
pirnt('SpeechDummyDriver:-----------------------------')
|
||||||
|
|
||||||
def cancel(self):
|
def cancel(self):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
|
pirnt('SpeechDummyDriver: Cancel')
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
pass
|
pirnt('SpeechDummyDriver: setCallback')
|
||||||
|
|
||||||
def clear_buffer(self):
|
def clear_buffer(self):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
|
pirnt('SpeechDummyDriver: clear_buffer')
|
||||||
|
|
||||||
def setVoice(self, voice):
|
def setVoice(self, voice):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
|
pirnt('SpeechDummyDriver: setVoice:' + str(voice))
|
||||||
|
|
||||||
def setPitch(self, pitch):
|
def setPitch(self, pitch):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
|
pirnt('SpeechDummyDriver: setPitch:' + str(pitch))
|
||||||
|
|
||||||
def setRate(self, rate):
|
def setRate(self, rate):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
|
pirnt('SpeechDummyDriver: setRate:' + str(rate))
|
||||||
|
|
||||||
def setModule(self, module):
|
def setModule(self, module):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
|
pirnt('SpeechDummyDriver: setModule:' + str(module))
|
||||||
|
|
||||||
def setLanguage(self, language):
|
def setLanguage(self, language):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
|
pirnt('SpeechDummyDriver: setLanguage:' + str(language))
|
||||||
|
|
||||||
def setVolume(self, volume):
|
def setVolume(self, volume):
|
||||||
if not self._isInitialized:
|
if not self._isInitialized:
|
||||||
return
|
return
|
||||||
|
pirnt('SpeechDummyDriver: setVolume:' + str(volume))
|
||||||
|
Loading…
Reference in New Issue
Block a user