glib.GError: no element "gconfaudiosrc"

  • 内容
  • 评论
  • 相关

        今天尝试了一下《ros by example》上的语音识别案例,按照书上的安装流程安装了PocketSphinx:

  1. $ sudo apt-get install gstreamer0.10-pocketsphinx
  2. $ sudo apt-get install ros-indigo-pocketsphinx
  3. $ sudo apt-get install ros-indigo-audio-common
  4. $ sudo apt-get install libasound2

           然后运行其中的例程:

  1. $ roslaunch pocketsphinx robocup.launch

        出现错误glib.GError: no element "gconfaudiosrc"

image

 

          在ROS answer上找到错误原因:缺失GStreamer组件(http://answers.ros.org/question/205091/pocketsphinx-recognizerpy-does-not-work-in-ros-indigo-and-ubuntu1404/

        解决问题的方法是直接安装组件即可:

  1. $ sudo apt-get install gstreamer0.10-gconf

        再次运行语音识别的案例,应该就没有问题了。


原创文章,转载请注明: 转载自古月居

本文链接地址: glib.GError: no element "gconfaudiosrc"

微信 OR 支付宝 扫描二维码
为本文作者 打个赏
pay_weixinpay_weixin

评论

5条评论
  1. Gravatar 头像

    cddd 回复

    编译 ORB_SLAM2中的Examples文件出现下面的错误,
    make[2]: *** No rule to make target 'opencv_calib3d-NOTFOUND', needed by '../RGBD'。 停止。
    CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/RGBD.dir/all' failed
    make[1]: *** [CMakeFiles/RGBD.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    请问哪错了,求指点?

    • 古月

      古月 回复

      @cddd 这个不清楚,看上去像是opencv_calib3d的问题

  2. Gravatar 头像

    新手小唐 回复

    按照《ros by example》上的语音识别案例,安装了相应的包,运行下roslaunch pocketsphinx robocup.launch,出现了如下错误:tds@wsl520:~/yuying$ roslaunch pocketsphinx robocup.launch
    ... logging to /home/tds/.ros/log/1a4f82d6-ff40-11e7-b872-9cd21e6d230b/roslaunch-wsl520-9938.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://wsl520:39417/

    SUMMARY
    ========

    PARAMETERS
    * /recognizer/dict: /home/tds/yuying/...
    * /recognizer/lm: /home/tds/yuying/...
    * /rosdistro: kinetic
    * /rosversion: 1.12.7

    NODES
    /
    recognizer (pocketsphinx/recognizer.py)

    auto-starting new master
    process[master]: started with pid [9949]
    ROS_MASTER_URI=http://localhost:11311

    setting /run_id to 1a4f82d6-ff40-11e7-b872-9cd21e6d230b
    process[rosout-1]: started with pid [9962]
    started core service [/rosout]
    process[recognizer-2]: started with pid [9970]
    File "/home/tds/yuying/src/pocketsphinx/nodes/recognizer.py", line 46
    SyntaxError: Non-ASCII character '\xe5' in file /home/tds/yuying/src/pocketsphinx/nodes/recognizer.py on line 46, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
    [recognizer-2] process has died [pid 9970, exit code 1, cmd /home/tds/yuying/src/pocketsphinx/nodes/recognizer.py __name:=recognizer __log:=/home/tds/.ros/log/1a4f82d6-ff40-11e7-b872-9cd21e6d230b/recognizer-2.log].
    log file: /home/tds/.ros/log/1a4f82d6-ff40-11e7-b872-9cd21e6d230b/recognizer-2*.log

    月哥您看应该如何解决呢?

    • 古月

      古月 回复

      @新手小唐 在recognizer.py文件最上方加下边一句试试:
      # -*- coding: utf-8 -*-

  3. Gravatar 头像

    wanghui 回复

    谢谢!

发表评论

电子邮件地址不会被公开。 必填项已用*标注