diff options
author | Gonzalo Odiard <godiard@sugarlabs.org> | 2011-02-24 20:30:58 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@sugarlabs.org> | 2011-02-24 20:30:58 (GMT) |
commit | 2123bbd08ca8a9f3852832570b205a5a972a3055 (patch) | |
tree | 2019e84561769109385209ee345fc33f7c471cd0 /speech_gst.py | |
parent | 9202daa7d92ada1f1536d812b0e1a62af9366192 (diff) |
Initial implementation of text to speech in epub backend
No highlight of spoken word yet.
Diffstat (limited to 'speech_gst.py')
-rw-r--r-- | speech_gst.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/speech_gst.py b/speech_gst.py index 4627c75..329f8d3 100644 --- a/speech_gst.py +++ b/speech_gst.py @@ -23,7 +23,11 @@ _logger = logging.getLogger('read-etexts-activity') def _message_cb(bus, message, pipe): - if message.type in (gst.MESSAGE_EOS, gst.MESSAGE_ERROR): + if message.type == gst.MESSAGE_EOS: + pipe.set_state(gst.STATE_NULL) + if speech.end_text_cb != None: + speech.end_text_cb() + if message.type == gst.MESSAGE_ERROR: pipe.set_state(gst.STATE_NULL) if pipe is play_speaker[1]: speech.reset_cb() |