From 61aeac28e63708f09a3f906b14444c5fd618152c Mon Sep 17 00:00:00 2001 From: chrys Date: Tue, 5 Jul 2016 19:35:11 +0200 Subject: [PATCH] espeak driver initial --- src/speech/es.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/speech/es.py b/src/speech/es.py index 4f3db5dd..4095d06a 100644 --- a/src/speech/es.py +++ b/src/speech/es.py @@ -3,20 +3,23 @@ # Espeak driver class speech(): - isInitialized = False - - def __init__(self): - try: - pass - isInitialized = True - except: - initialized = False + def __init__(self, ): + self.es = None + self.isInitialized = False +# try: + from espeak import espeak + self.es = espeak + self.isInitialized = True +# except: +# self.initialized = False - def speak(text, queueable=True): + + def speak(self,text, queueable=True): if queueable == False: self.stop() + self.es.synth(text) def stop(self): - pass + self.es.cancel() def clear_buffer(self): pass