看到一个好玩的东西,百度的语音识别,大家可以自己DIY一些小东西了。
参考:http://www.rosclub.cn/post-1032.html
1. 前面的下载,安装都没问题,故跳过不用理会。
2. 测试
下载之后:CMakeList.txt和packge.xml中需要修改,不然依赖无法满足。什么依赖可去了解一下ROS的文件系统。
里面所有的baidu_speech改为simple_voice.
以下是CmakeList.txt文件
cmake_minimum_required(VERSION 2.8.3)
project(simple_voice)
find_package(catkin REQUIRED COMPONENTS
rospy std_msgs message_generation
)
## Generate messages in the 'msg' folder
add_message_files(
FILES
TTS_message.msg
# Message2.msg
)
##Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs # Or other packages containing msgs
)
catkin_package(
# INCLUDE_DIRS include
LIBRARIES simple_voice
CATKIN_DEPENDS rospy message_runtime std_msgs
#DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}
)
以下是packge.xml文件
<?xml version="1.0"?>
<package format="2">
<name>simple_voice</name>
<version>0.2.1</version>
<description>The simple_voice package</description>
<maintainer email="jcl@todo.todo">jcl</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>rospy</build_depend>
<exec_depend>rospy</exec_depend>
<build_depend>message_generation</build_depend>
<exec_depend>message_runtime</exec_depend>
<build_depend>std_msgs</build_depend>
<exec_depend>std_msgs</exec_depend>
<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->
</export>
</package>
我其实是catkin_create_pkg simple_voice建立的功能包,将新的东西复制了进去再修改,才能很好的编译通过。。
catkin_make –pkg simple_voice 编译该包
roslaunch simple_voice simple_speaker.launch
运行时仍然出了问题,问题如下,显示import requests 错误。
解决方案:http://blog.51cto.com/9455163/1825839
该问题解决
3.
4.