The script shows how to control ROS turtlebot with English keywords using pocketsphinx
Compared to an earlier implementation, this one:
- enables the keyword search mode, which should better filter not needed words
- uses pocketsphinx-python instead of Gstreamer
- is really simple (just a script to run)
It was currently tested only for linux and ROS Indigo turtlebot
sudo apt-get install -y python python-dev python-pip build-essential swig libpulse-dev git
sudo pip install pyaudio
sudo pip install pocketsphinx
If you are new to ROS (like me), check this introductory video for ROS installation details
More instructions can be found on ROS website
Run turtlebot environment:
roslaunch turtlebot_gazebo turtlebot_world.launch
In a separate terminal run the script:
python ros_voice_control.py
Speak one of the default commands ( forward / move / stop / left / right / back / full speed / half speed )
You can run this with any set of words. To do that, you need lexicon and keyword list files (check voice_cmd.dic and voice_cmd.kwlist for details).
Word pronunciations for English can be found in CMUdict
You can also download pocketsphinx acoustic models for several other languages here
Read more about pocketsphinx on the official website: http://cmusphinx.sourceforge.net