May 2015
Intermediate to advanced
330 pages
7h 18m
English
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): ...Read now
Unlock full access