Working with Speech recognition in ROS Indigo and Python

Compared to other speech recognition methods, one of the easiest and effective methods to implement real time speech recognition is Pocket Sphinx and GStreamer pipeline. We discussed Pocket Sphinx, GStreamer and its interfacing with Python previously. Next, we can see a ROS package called pocketsphinx that uses the GStreamer pocketsphinx interface to perform speech recognition. The pocketsphinx ROS package is available in the ROS repository. You will get the package information at the following link

http://wiki.ros.org/pocketsphinx

Installation of the pocketsphinx package in ROS Indigo

To install the pocketsphinx package, first switch to the catkin workspace source folder.

  1. Download the source code of the pocketsphinx package using the following command:
    $ git clone https://github.com/mikeferguson/pocketsphinx
    
  2. Execute the catkin_make command from the catkin workspace folder to build the package
  3. Start the speech recognizer demo using the following command. The robotcup demo has some basic commands to drive the robot. We can change the command by adapting acoustic and language models:
    $ roslaunch pocketsphinx robocup.launch
    
  4. Subscribe to /recognizer/output using the following command:
    $ rostopic echo /recognizer/output
    

The following is the screenshot of the output:

Installation of the pocketsphinx package in ROS Indigo

This Topic can be subscribed and the command can be processed in some other nodes. In the next section, we will see how to synthesize speech using ROS and Python.

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

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