ROS语音识别代码学习:http://cmusphinx.sourceforge.net/wiki/gstreamer
将cmusphinx语音识别的功能和方法掌握之后,需要将其在ros中使用起来,没想到中间也也到了不少问题。
替换hmm参数的方法:self.pipeline = gst.parse_launch('gconfaudiosrc ! audioconvert ! audioresample ' + '! vader name=vad auto_threshold=true ' + '! pocketsphinx hmm=tds_sc_8kadapt lm=robot.lm.dmp dict=robot.dic name=asr ! fakesink')
或根据英文文档的方法:asr.set_property('lm', '/home/user/mylanguagemodel.lm') asr.set_property('dict', '/home/user/mylanguagemodel.dic') gstreamer版本说明:Install a GStreamer version from the official repositories:
- gstreamer - Current version.
- gstreamer0.10 - Legacy but widely used version.
To make GStreamer useful, install the plugins packages you require.
Current version plugins
- gst-libav - Libav-based plugin containing many decoders and encoders.
- gst-plugins-bad - Plugins that need more quality, testing or documentation.