Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/espeak.py
diff options
context:
space:
mode:
authorflavio <fdanesse@gmail.com>2012-07-18 01:12:14 (GMT)
committer flavio <fdanesse@gmail.com>2012-07-18 01:12:14 (GMT)
commit973dc1a85c8b770c8e365457546c6fe816f58aa8 (patch)
tree33f47b669f9c0ee1ddec176edac53718e66bac9f /espeak.py
parent0edb2b73645352222a518ca98d7c8b6e7fc4c063 (diff)
The activity starts
Diffstat (limited to 'espeak.py')
-rw-r--r--espeak.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/espeak.py b/espeak.py
index 1a88af3..7a2b888 100644
--- a/espeak.py
+++ b/espeak.py
@@ -15,7 +15,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import gst
-import gobject
+from gi.repository import GObject
import subprocess
import logging
@@ -24,13 +24,13 @@ logger = logging.getLogger('speak')
supported = True
-class BaseAudioGrab(gobject.GObject):
+class BaseAudioGrab(GObject.GObject):
__gsignals__ = {
- 'new-buffer': (gobject.SIGNAL_RUN_FIRST, None, [gobject.TYPE_PYOBJECT])
+ 'new-buffer': (GObject.SIGNAL_RUN_FIRST, None, [GObject.TYPE_PYOBJECT])
}
def __init__(self):
- gobject.GObject.__init__(self)
+ GObject.GObject.__init__(self)
self.pipeline = None
self.quiet = True
@@ -69,7 +69,7 @@ class BaseAudioGrab(gobject.GObject):
def on_buffer(element, buffer, pad):
# we got a new buffer of data, ask for another
- gobject.timeout_add(100, self._new_buffer, str(buffer))
+ GObject.timeout_add(100, self._new_buffer, str(buffer))
return True
sink = self.pipeline.get_by_name('sink')
@@ -87,7 +87,7 @@ class BaseAudioGrab(gobject.GObject):
logger.debug(message.type)
self._was_message = False
- gobject.timeout_add(500, self._new_buffer, str(buffer))
+ GObject.timeout_add(500, self._new_buffer, str(buffer))
elif message.type in (gst.MESSAGE_EOS, gst.MESSAGE_ERROR):
logger.debug(message.type)