Speech converted to text

1. Function introduction

The voice is recorded into a wav file through the external sound card of the nano, and the voice recognition is achieved with the voice library pocketsphinx, which can be recognized offline. This function has a higher recognition rate for English, but a poorer recognition rate for Chinese.

2. Running function

<aside> 💡 Note: Before running the command, please make sure that the programs in other terminals have been terminated. The termination command is: Ctrl+c.

</aside>

  1. Enter the following command in the terminal. When “recording” appears in the terminal, start to record the voice. After 3 seconds, the recording is complete, and “Done” will appear on the terminal.

    rosrun voice  demo_record_voice.py
    

https://github.com/agilexrobotics/limo_pro_doc/raw/master/LIMO_image/voice_record.png

After the voice is recorded, enter the command in the terminal:

rosrun voice  demo_voice2word.py output.wav

https://github.com/agilexrobotics/limo_pro_doc/raw/master/LIMO_image/voice_2word.png

9.2 Voice control

9.2.1 Function Introduction

Control Limo to move ahead, move back, turn right, and turn left by saying ahead, back, right and left to Limo.

9.2.2 Running function

Note: Before running the command, please make sure that the p

  1. Launch the chassis node, and adjust the handle to the command mode after the chassis node is launched.
 roslaunch limo_base limo_base.launch

  1. Launch the voice control node. After launching, the interface shown in the figure below will appear. Enter 1 and press Enter to enter the voice recording mode and control limo. Enter q to quit.
rosrun voice voice_ctr_node.py

https://github.com/agilexrobotics/limo_pro_doc/raw/master/LIMO_image/voice_ctr.png