diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-03-04 17:24:16 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-03-04 17:24:16 (GMT) |
commit | b8292b6c3e83c2333e3716c36ac8dad510d52f07 (patch) | |
tree | e7496a635abef1267fc99e86080b4fa875f2f36c /speech.py | |
parent | 49ba5edddced0b92e109f1fb903e1821c6a9f336 (diff) |
Synchronize speech and play button statuses
Diffstat (limited to 'speech.py')
-rw-r--r-- | speech.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -30,6 +30,10 @@ except: done = True class EspeakThread(threading.Thread): + def __init__(self, stop_cb): + threading.Thread.__init__(self) + self.stop_cb = stop_cb + def run(self): "This is the code that is executed when the start() method is called" global done @@ -48,6 +52,7 @@ class EspeakThread(threading.Thread): time.sleep(0.1) self.cancel() self.client.close() + self.stop_cb() except: print 'speech-dispatcher client not created' |