start_speech_chat.launch

The start_speech_chat.launch launch file will start the AIML server, AIML TTS node, and speech recognition node:

    <launch> 
      <param name="aiml_path" 
    value="/home/robot/ros_robotics_projects_ws/src/ros_aiml/data" /> 
      <node name="aiml_server" pkg="ros_aiml" type="aiml_server.py" 
    output="screen"> 
      </node> 
      <include file="$(find sound_play)/soundplay_node.launch">
      </include> 
      <node name="aiml_tts" pkg="ros_aiml" type="aiml_tts_client.py" 
    output="screen"> 
      </node> 
      <node name="aiml_speech_recog" pkg="ros_aiml" 
    type="aiml_speech_recog_client.py" output="screen"> 
      </node> 
    </launch> 

After creating the launch file, change its permission using the following command:

    $ sudo chmod +x *.launch

Use the following command to start interacting with the AIML interpreter:

    $ roslaunch ros_aiml start_chat.launch

We can use the following command to start interacting with the AIML interpreter. The response will be converted to speech as well:

    $ roslaunch ros_aiml start_tts_chat.launch

The following command will enable speech recognition and TTS:

    $ roslaunch ros_aiml start_speech_chat.launch

If you set up the pocketsphinx package for speech recognition, you can run it using the following command:

    $ roslaunch pocketsphinx robotcup.launch

Figure 7: Output of the start_speech_chat launch file

Here are the topics generated when we run this launch file:

Figure 8: List of ROS topics

We can test the entire system without the speech recognition system too. You can manually publish the string to the /recognizer/output topic, as shown here:

Figure 9: Manually publishing input to speech topic

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.92.234