Activity Team/gst-plugins-espeak: Difference between revisions

Line 39: Line 39:


==== Simple Python example ====
==== Simple Python example ====
  import gtk
  import gst<br>
  def gstmessage_cb(bus, message, pipe):
      if message.type in (gst.MESSAGE_EOS, gst.MESSAGE_ERROR):
          pipe.set_state(gst.STATE_NULL)<br>
  pipeline = 'espeak text="Hello world!" ! autoaudiosink'
  pipe = gst.parse_launch(pipeline)<br>
  bus = pipe.get_bus()
  bus.add_signal_watch()
  bus.connect('message', gstmessage_cb, pipe)<br>
  pipe.set_state(gst.STATE_PLAYING)<br>
  gtk.main()


==== Polyphony example ====
==== Polyphony example ====