O'Reilly logo

Learning Robotics Using Python by Lentin Joseph

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Real-time speech recognition using Pocket Sphinx, GStreamer, and Python in Ubuntu 14.04.2

The following is the code for real-time speech recognition using GStreamer:

#!/usr/bin/env python #The following modules need to import before handling gstreamer API's import gobject import sys import pygst pygst.require('0.10') gobject.threads_init() import gst #Module to handle keyboard interrupt signal import signal #Keyboard signal handling routine def signal_handle(signal, frame): print "You pressed Ctrl+C" sys.exit(0) #Implementation of Speech recognition class class Speech_Recog(object): #Initializing gstreamer pipeline and pocket sphinx element def __init__(self): self.init_gst() #This function will initialize gstreamer pipeline def init_gst(self): ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required