MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
quarc_host_speech_recognition_kuka_robot_demoQUARC Host Speech Recognition Kuka Robot Demo
This example demonstrates how to respond to more complex voice commands using the Host Speech Recognition block from the QUARC Targets library. For details of the Host Speech Recognition block, please refer to the Host Speech Recognition block reference page in the QUARC documentation.
Demonstration
Before running the demonstration for the first time, be sure to configure speech recognition on your computer. Use the Speech Recognition Control Panel applet in Windows to configure the default Microsoft Speech Recognition engine. It may be found under the "Ease of Access" category in Control Panel. A microphone designed for speech recognition should be used to get optimal results. Using a USB headset is generally preferable to using a sound card in the PC.
Select Ctrl+B while the diagram is the active window. A great deal of output will appear in the Diagnostic Viewer about the progress of the build. If you cannot see the Diagnostic Viewer, you can open it by selecting from the menu of the diagram, or clicking on the View Diagnostics hyperlink at the bottom of the diagram. If you have MATLAB R2013b or earlier then the output will appear in the MATLAB Command Window.
from the menu of the diagram, or pressClick on the
button or select from the menu of the diagram to connect to the model.Start the model by clicking on the
button or selecting from the menu of the diagram. The item of the menu may also be used to both connect and start the model in one operation.The model will begin responding to voice commands. The commands it recognizes are:
where ??? denotes an arbitrary real number with up to three integer digits, such as "53.1" or "-123.69". For example, "move base to -30 degrees" or "roll wrist to 20 degrees".
Note that the Minimum Confidence parameter of the Host Speech Recognition block may need to be adjusted to obtain optimal recognition results. For the default Microsoft Speech Recognition Engine included with Windows 7 and above, the confidence level may range from 0 to 1. Higher values cause the speech engine to be more stringent in its assessment of a recognition, leading to fewer false recognitions. However, if the value is too high then it might not recognize the speech at all. This value is speech engine dependent, so it is safest to start with a value of zero and increase it if an improvement in speech recognition accuracy is required. If the default Microsoft Speech Engine is being used a value of 0.90 to 0.94 typically produces reasonable recognition accuracy.
When a voice command is recognized the Kuka robot animation will move to the specified position.
Also, the "new" output will go high for one sampling instant "cmd" port of the Host Speech Recognition block will output the one-based index of the spoken command in its list.
To make it easier to see which command the Host Speech Recognition block has recognized, a String Select block and String Print block is used to convert the command identifier and degrees back to a human-readable string. The string is printed in the String Display block.
Click on the
button or select from the menu of the diagram to stop the model. The item of the menu may also be used.Running the example on a different target
To run the example on a different target, refer to the instructions on the Running QUARC Examples on Remote Targets page.
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.