Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/speech.py
diff options
context:
space:
mode:
authorAleksey 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)
commitb8292b6c3e83c2333e3716c36ac8dad510d52f07 (patch)
treee7496a635abef1267fc99e86080b4fa875f2f36c /speech.py
parent49ba5edddced0b92e109f1fb903e1821c6a9f336 (diff)
Synchronize speech and play button statuses
Diffstat (limited to 'speech.py')
-rw-r--r--speech.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/speech.py b/speech.py
index 9f6ccb4..5084826 100644
--- a/speech.py
+++ b/speech.py
@@ -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'