ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Problems with pocketsphinx for speech recognition

asked 2015-09-08 10:56:32 -0500

rubber bread gravatar image

Hi,all I install ros-by-exanple-indigo code on my computer.And I prepare to test pocketsphinx for speech recognition.However,Once I run the .launch file there will be a mistake which will kill the program.Steps and mistakes as follow.

run command:

 roslaunch pocketsphinx robocup.launch

terminal display:

   ... logging to /home/aicrobo/.ros/log/cabf42a4-563d-11e5-8ab7-e8b1fc053d0e/roslaunch-ubuntu-5253.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:49975/


 * /recognizer/dict: /opt/ros/indigo/s...
 * /recognizer/lm: /opt/ros/indigo/s...
 * /rosdistro: indigo
 * /rosversion: 1.11.13

    recognizer (pocketsphinx/


core service [/rosout] found
process[recognizer-1]: started with pid [5271]
the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'
[INFO] [WallTime: 1441726151.014228] Launch config: gconfaudiosrc
/opt/ros/indigo/lib/pocketsphinx/ SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see for more information. = rospy.Publisher('~output', String)
[INFO] [WallTime: 1441726151.017618] Starting recognizer... 
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/pocketsphinx/", line 177, in <module>
    start = recognizer()
  File "/opt/ros/indigo/lib/pocketsphinx/", line 73, in __init__
  File "/opt/ros/indigo/lib/pocketsphinx/", line 80, in start_recognizer
    self.pipeline = gst.parse_launch(self.launch_config)
glib.GError: no element "gconfaudiosrc"
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/", line 399, in signal_shutdown
  File "/opt/ros/indigo/lib/pocketsphinx/", line 131, in shutdown
RuntimeError: called outside of a mainloop
[recognizer-1] process has died [pid 5271, exit code 1, cmd /opt/ros/indigo/lib/pocketsphinx/ __name:=recognizer __log:=/home/aicrobo/.ros/log/cabf42a4-563d-11e5-8ab7-e8b1fc053d0e/recognizer-1.log].
log file: /home/aicrobo/.ros/log/cabf42a4-563d-11e5-8ab7-e8b1fc053d0e/recognizer-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete


edit retag flag offensive close merge delete


Please do not repost; it clutters the forums. If someone with relevant knowledge knows the answer to your question, they will respond. I have set your user status to 'moderated' for excessive reposting.

ahendrix gravatar image ahendrix  ( 2015-09-08 23:44:41 -0500 )edit

sorry,there're some mistakes with my Firefox.I can't upload the question (However, it has already uploaded) So ,the question uploaded like repost.

rubber bread gravatar image rubber bread  ( 2015-09-09 10:16:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-09-09 02:14:12 -0500

Humpelstilzchen gravatar image

You are missing the gstreamer 0.10 element gconfaudiosrc, try installing it. Depending on your Linux Distribution it is named something like gstreamer0.10-gconf.

edit flag offensive delete link more


Thanks a lot.After I runsudo apt-get install gstreamer0.10-gconf it worked

rubber bread gravatar image rubber bread  ( 2015-09-09 10:27:17 -0500 )edit

Question Tools

1 follower


Asked: 2015-09-08 10:56:32 -0500

Seen: 1,208 times

Last updated: Sep 09 '15