From 18ab70f1886c5f83cea278d281ae1e509c00d509 Mon Sep 17 00:00:00 2001 From: chrys87 Date: Mon, 30 Jan 2017 16:13:07 +0100 Subject: [PATCH] improve debug of dummy speech driver --- src/fenrir/speechDriver/dummyDriver.py | 28 ++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/fenrir/speechDriver/dummyDriver.py b/src/fenrir/speechDriver/dummyDriver.py index 0e75210a..764471f0 100644 --- a/src/fenrir/speechDriver/dummyDriver.py +++ b/src/fenrir/speechDriver/dummyDriver.py @@ -11,48 +11,60 @@ class driver(): def __init__(self): pass def initialize(self, environment): - self._isInitialized = False - self.env = environment + self._isInitialized = True + self.env = environment + pirnt('SpeechDummyDriver: Iitialize') + def shutdown(self): - pass + pirnt('SpeechDummyDriver: Shutdown') def speak(self,text, queueable=True): if not self._isInitialized: - return False + return if not queueable: self.cancel() + pirnt('SpeechDummyDriver: Speak:'+text) + pirnt('SpeechDummyDriver:-----------------------------') def cancel(self): if not self._isInitialized: return + pirnt('SpeechDummyDriver: Cancel') def setCallback(self, callback): - pass + pirnt('SpeechDummyDriver: setCallback') def clear_buffer(self): if not self._isInitialized: return + pirnt('SpeechDummyDriver: clear_buffer') def setVoice(self, voice): if not self._isInitialized: - return + return + pirnt('SpeechDummyDriver: setVoice:' + str(voice)) def setPitch(self, pitch): if not self._isInitialized: - return + return + pirnt('SpeechDummyDriver: setPitch:' + str(pitch)) def setRate(self, rate): if not self._isInitialized: - return + return + pirnt('SpeechDummyDriver: setRate:' + str(rate)) def setModule(self, module): if not self._isInitialized: return + pirnt('SpeechDummyDriver: setModule:' + str(module)) def setLanguage(self, language): if not self._isInitialized: return + pirnt('SpeechDummyDriver: setLanguage:' + str(language)) def setVolume(self, volume): if not self._isInitialized: return + pirnt('SpeechDummyDriver: setVolume:' + str(volume))