|
@@ -26,7 +26,12 @@ class Recognizer(gobject.GObject):
|
26
|
26
|
|
27
|
27
|
#build the pipeline
|
28
|
28
|
cmd = audio_src+' ! audioconvert ! audioresample ! vader name=vad ! pocketsphinx name=asr ! appsink sync=false'
|
29
|
|
- self.pipeline=gst.parse_launch( cmd )
|
|
29
|
+ try:
|
|
30
|
+ self.pipeline=gst.parse_launch( cmd )
|
|
31
|
+ except Exception, e:
|
|
32
|
+ print e.message
|
|
33
|
+ print "You may need to install gstreamer0.10-pocketsphinx"
|
|
34
|
+
|
30
|
35
|
#get the Auto Speech Recognition piece
|
31
|
36
|
asr=self.pipeline.get_by_name('asr')
|
32
|
37
|
asr.connect('result', self.result)
|