今天尝试了一下《ros by example》上的语音识别案例,按照书上的安装流程安装了PocketSphinx:
$ sudo apt-get install gstreamer0.10-pocketsphinx
$ sudo apt-get install ros-indigo-pocketsphinx
$ sudo apt-get install ros-indigo-audio-common
$ sudo apt-get install libasound2
然后运行其中的例程:
$ roslaunch pocketsphinx robocup.launch
出现错误glib.GError: no element “gconfaudiosrc”
在ROS answer上找到错误原因:缺失GStreamer组件(http://answers.ros.org/question/205091/pocketsphinx-recognizerpy-does-not-work-in-ros-indigo-and-ubuntu1404/)
解决问题的方法是直接安装组件即可:
$ sudo apt-get install gstreamer0.10-gconf
再次运行语音识别的案例,应该就没有问题了。
评论列表(10条)
老师好,我同样是遇到了相同的问题glib.GError: 无组件“gconfaudiosrc”然后就RuntimeError: called outside of a mainloop。但是我apt-get install gstreamer0.10-gconf已经定位不到安装包了,所以我就从Debian上下载安装了最新的gstreamer0.10-gconf,问题是重新运行语音识别的案例还是解决不了,老师请问下应该怎么解决?(我的ROS版本是Melodic)
运行同样的程序的时候出现“glib.GError:no element “audioconvert”,古月老师,请问这个是什么问题?
你好,请问你解决了么?我也遇到这个问题了。
在你的书中,第188页,语音识别测试,如果遇到pocketsphinx功能包运行时错误,下载语音引擎,并且解压缩文件和拷贝,这里能讲一下具体操作吗?
拷贝其中的model文件到功能包中,是怎么样的?我
编译 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
请问哪错了,求指点?
这个不清楚,看上去像是opencv_calib3d的问题
按照《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 -*-
谢谢!