1. Introduction of voice module

1.1. Introduction to the voice module

1.1.1. CSK4002 chip

The voice control module on ROSMASTER is developed based on the CSK4002 chip. CSK4002 is an AISoC with higher performance, better computing power, lower power consumption and designed for the AloT field. It can be widely used in smart home, smart home appliances, and emerging consumer electronics industries.

1.2. Using the voice module

1.2.1. Wiring

The module is connected to the ROSMASTER robot (or HUB board) through a Type-c data cable, and the speaker and the module are connected through a PH2.0 data cable.

image-20220422092346820

image-20220422092436482

1.2.2. Wake-up word

The wake-up word is "Hi, Yahboom". When you wake up, you need to slow down your speech rate. If it is too fast, the module will not recognize it. After the module is woken up, other command words can be recognized later.

Within 20 seconds of waking up, you don't need to wake up again, just say the command word directly.

1.2.3. Command words

1.Voice control car movement

speech recognition contentThe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
Robot stop$B002#$A002#OK , I'm stop.
Go ahead$B004#$A004#OK , let's go.
Back$B005#$A005#OK , I‘m back.
Turn left$B006#$A006#OK , I‘m turning left.
Turn right$B007#$A007#OK , I‘m turning right.
Enter A mode$B008#$A008#OK, I‘m working on A mode.
Enter B mode$B009#$A009#OK, I‘m working on B mode.

2.Voice control RGB light strip effect

speech recognition contentThe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
Close light$B010#$A010#OK, light is closed.
Red light up$B011#$A011#OK, red light is on.
Green light up$B012#$A012#OK, green light is on.
Blue light up$B013#$A013#OK, blue light is on.
Yellow light up$B014#$A014#OK, yellow light is on.
light A$B015#$A015#OK, light A is on.
light B$B016#$A016#OK, light B is on.
light C$B017#$A017#OK, light C is on.
Display battery value$B018#$A018#OK, battery value has been display.

3.Voice control color recognition

speech recognition contentThe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
What color is this?$B060#$A061#This is red
What color is this?$B060#$A062#This is blue
What color is this?$B060#$A063#This is green
What color is this?$B060#$A064#This is yellow

4.Voice control color tracking

speech recognition contentThe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
yellow following$B072#$A072#OK, I found the yellow
red following$B073#$A073#OK, I found the red
green following$B074#$A074#OK, I found the green
follow this color$B075#$A075#OK, I found this color
stop following$B076#$A076#OK, it has been stoped

5.Voice control automatic driving (line patrol)

speech recognition contentThe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
Close tracking mode$B022#$A022#OK, tracking mode is closed
Tracking the red line$B023#$A023#OK, I will track the red line
Tracking the green line$B024#$A024#OK, I will track the green line
Tracking the blue line$B025#$A025#OK, I will track the blue line
Tracking the yellow line$B026#$A026#OK, I will track the yellow line

6.Voice control multi-point navigation

speech recognition contentThe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
Go to the point A$B019#$A019#OK, I'm going to the point A.
Go to the point B$B020#$A020#OK, I'm going to the point B.
Go to the point C$B021#$A021#OK, I'm going to the point C.
Go to the point D$B022#$A022#OK, I'm going to the point D.
Return to the original place$B023#$A023#OK, I'm return back.

7.Basic voice control of robotic arm

speech recognition contenthe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
Warning$B038#$A038#OK
Lift the arm up$B039#$A039#OK , the arm has been raised
Put the arm down$B040#$A040#OK, the arm is down
Arm left$B041#$A041#OK, the arm has turned left
Arm right$B042#$A042#OK, the arm has turned right
Clamp the clip$B043#$A043#OK, the clip is clamped
Open the clip$B044#$A044#OK, the clip has been opened.
  1. control of robotic arm

speech recognition contenthe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
Action A$B045#$A045#OK
Action B$B046#$A045#OK
Action C$B047#$A045#OK
Action D$B048#$A045#OK
Reset$B049#$A045#OK
Action E$B050#$A045#OK
  1. action of the robotic arm

speech recognition contenthe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
Dancing$B052#$A052#OK, Let's dance
Clip the block$B053#$A053#OK,let me clip them
  1. robotic arm memory learning

speech recognition contenthe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
record it$B055#$A055# $A056#OK, please set the next action.
Too many actions, I can't record them
Now is over$B056#$A057#OK,Noted it,I've recorded them.
Display actions$B057#$A058#OK, Let's do it
Clear actions$B058#$A059#OK, actions have been cleared
  1. Sort color block

speech recognition contenthe voice module is sent to the hostThe host sends to the voice moduleVoice broadcast content
Sort color block$B061#$A065#It has been in its place
  $A066#This is yellow
  $A067#This is green
  $A068#This is blue
  $A069#This is red

2. Voice control module port binding

Since the ID device number of the ROS expansion board and the voice control module are the same, it is not possible to bind the ID device number according to the method in the previous tutorial. Unbound ports may cause port conflicts or device identification errors. Do not change the positions of bound ports at will. Otherwise, the bound ports become invalid.

This course is completed on the host, no docke binding is required, and this section uses the Raspberry PI as the host to demonstrate. Before binding, it is necessary to comment out the part involving myserial in the host rule file, otherwise the voice board and ROS extension board will be identified as the same device.

As shown in the figure above, the myserial related binding content is commented, saved and quit, and the terminal enters the following command to reload the rule.

2.1. Bind the device of the ROS expansion board

ttyUSB0 is the radar device , Then ttyUSB1 is the device of the ROS expansion board

The following information is obtained (based on actual conditions). The red box indicates the path information of the device.

Add content as shown below

2.2. bind the device of the voice board

Here we find that the voice board is identified by the system as /dev/ttyUSB2, so we enter the following command to view the path of the device

Add content as shown below

2.3. Test

Attention their wiring position. This is fixed after binding, do not change the position at will, otherwise the system will not recognize the device.

As shown in the figure above, if /dev/myserial and /dev/myspeech can be identified and the ttyUSB* port numbers behind them are inconsistent, the binding is successful

Attention: The ROS expansion board and voice board cannot be plugged into other ports after binding, otherwise the device number will not be recognized. If both are connected to the HUB expansion board, the HUB board cannot be plugged into other mainboard ports

2.4. Notes

After the voice board is bound to the container, you need to mount /dev/myspeech to identify the voice board in docker, Mount mode reference [07、Docker-05、Enter the robot's Docker container]