Working with speech synthesis in ROS Indigo and Python
In ROS, there are some ROS packages that perform speech synthesis. Here, we will discuss one ROS package. This package uses Festival as the backend. The package name is sound_play
. It has nodes and launch scripts that enable speech synthesis. We need to perform the following steps for speech synthesis:
We can install the
sound_play
package using the following command:$ sudo apt-get install ros-indigo-sound-play
After the installation of package, we have to create a sample ROS package to interact with the sound-play node. The following is the command to create a sample package in ROS with the sound-play package as dependency:
$ catkin_create_pkg sample_tts rospy roscpp sound_play std_msgs
We have to create a
sound_play
python client code for sending text to sound play server node. This client will send the text that needs to be converted to speech to thesound_play
server node. The client will send the text to convert to speech in a Topic...