Rosanswers logo

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/recognizer.py)


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/recognizer.py:68: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.pub = rospy.Publisher('~output', String)
[INFO] [WallTime: 1441726151.017618] Starting recognizer... 
Traceback (most recent call last):
  File "/opt/ros/indigo/lib/pocketsphinx/recognizer.py", line 177, in <module>
    start = recognizer()
  File "/opt/ros/indigo/lib/pocketsphinx/recognizer.py", line 73, in __init__
  File "/opt/ros/indigo/lib/pocketsphinx/recognizer.py", 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/core.py", line 399, in signal_shutdown
  File "/opt/ros/indigo/lib/pocketsphinx/recognizer.py", 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/recognizer.py __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


Originally posted by rubber bread on ROS Answers with karma: 3 on 2015-09-08

Post score: 0

Original comments

Comment by ahendrix on 2015-09-08:
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.

Comment by rubber bread on 2015-09-09:
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.


1 Answer 1


Rosanswers logo

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.

Originally posted by Humpelstilzchen with karma: 1504 on 2015-09-09

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by rubber bread on 2015-09-09:
Thanks a lot.After I runsudo apt-get install gstreamer0.10-gconf it worked


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.