Voice Command Widget
Overview
Voice Command Widget in Mendix that allows users to control the application using voice commands. This widget is particularly useful for hands-free operation in industrial applications and accessibility features for users with disabilities.
Documentation
Typical Usage Scenario
The Voice Command Widget integrates voice recognition technology into your Mendix applications, enabling users to control the application using voice commands. This is particularly useful for hands-free operations in industrial applications or as an accessibility feature for users with disabilities.
Features and Limitations
Features:
- Voice Command Recognition: Recognizes predefined voice commands and triggers corresponding actions in the Mendix application.
- Customizable Commands: Allows customization of voice commands through a JSON configuration.
- Microflow Integration: Executes a specified microflow when a command is recognized.
Limitations:
- Browser Support: The widget relies on the browser's built-in speech recognition capabilities (webkitSpeechRecognition), which may not be supported in all browsers.
- Language Support: Limited to the languages supported by the browser's speech recognition service.
- Environment: Requires a quiet environment for accurate recognition.
Dependencies
- Mendix Modeler: Version 9.19 or above.
- Browser: Must support the Web Speech API (e.g., Google Chrome).
Installation
- Download the Widget: Obtain the widget from the Mendix App Store or your widget repository.
- Import into Mendix: In Mendix Studio Pro, import the widget into your project by selecting App Explorer > Widgets > Add widget.
- Add to Page: Drag and drop the Voice Command Widget onto a page in your Mendix application.
Configuration
- Configure Properties:
- Commands: Set the commands property with a JSON string representing the list of voice commands, e.g., ["start", "stop", "submit", "cancel"].
- On Command Recognized: Set the onCommandRecognized property to the microflow that should be triggered when a command is recognized.
- Create and Configure Microflow:
- Create a microflow that will be executed when a command is recognized.
- Ensure the microflow can handle the recognized command appropriately.
Known Bugs
- Recognition Issues: In noisy environments, the accuracy of voice recognition may be reduced.
- Browser Compatibility: Some browsers may not support the Web Speech API, leading to widget malfunction.
Frequently Asked Questions
Q: Which browsers support the Voice Command Widget?
A: The widget is supported in browsers that implement the Web Speech API, such as Google Chrome.
Q: Can I add multiple voice commands?
A: Yes, you can specify multiple commands in the commands property using a JSON string.
Q: What happens if a command is not recognized?
A: If a command is not recognized, the widget will continue listening for valid commands. No action will be triggered for unrecognized commands.