-
Notifications
You must be signed in to change notification settings - Fork 0
Speech recognition
Open up a terminal and type the below command to install pocketsphinx:
sudo apt-get install gstreamer0.10-pocketsphinx
Install the ROS wrapper:
roscd /home/bwi/catkin_ws/src/bwi_experimental
git clone
https://github.com/mikeferguson/pocketsphinx
More information about the wrapper is available here: http://wiki.ros.org/pocketsphinx
Frequently, we need to create our own vocabularies. The size is small so the recognition can be relatively accurate. Still it should include most of the words can appear in conversations.
- Step 0: create a “corpus” file
Create a new file, say “hri.corpus”. This file includes a set of sentences that represent how people If the corpus file was created properly, a TAR file named “TARxxxx.tgz” would be generated and downloadable for you. If not, go back to remove the words/symbols that may cause trouble.
- Step 2: save the “lm” and “dic” files
Save the “TARxxxx.tgz” file to:
/home/bwi/catkin_ws/src/bwi_experimental/pocketsphinx/demo
Change the current directory, and untar the file (xxxx would be 4 digits):
cd /home/bwi/catkin_ws/src/bwi_experimental/pocketsphinx/demo
tar zxvf TARxxxx.tgz
rm TARxxxx.tgz
- Step 3: create a launch file (say “hri.launch”) that loads the models automatically when startup. Put it under ./pocketsphinx/launch/
Now you can run it:
roslaunch pocketsphinx hri.launch