Automatic Voice Commands - Advanced
Last updated
Last updated
In some cases, developers may want to overwrite an automatically registered voice command to a synonym or a different phrase, or add aliases.
A user's interaction with UI components is driven by . For example, the text-input
component includes the focus()
and clear()
methods, which allow users to enter and clear text respectively.
Voice commands are tied to these component methods. This means that in most cases, when a user speaks a voice command, a component method will be triggered under the hood.
This can be illustrated as follows:
Apps ship with a set of default voice commands for component methods. Developers can change these default commands on a component, view or app level (see the section for further information about the distinction between these levels). Below are some examples to illustrate.
Example: configuring the voice commands for the button
fire-action()
method on a component level:
In this example, the following voice commands are registered for the button
:
"Submit questionnaire"
"Submit form"
As seen in the above example, the voice-...=""
attributes can be a comma separated list to register aliases for a component method.
Example: configuring the voice commands for the text-input
focus()
method on the main
view:
In this example, given a text-input
with a label of, say, "First name", the following voice commands are registered to allow a user to focus on the text-input
to enter a value:
"First name"
"Select First name"
"Edit First name"
"Select textbox"
Example: configuring the voice commands for the text-input
clear()
method on an app level:
In this example, the following voice commands are registered for a text-input
once the user enters a value:
"Clear text"
"Clear textbox"
App translations currently have limited support. For UI component labels and other values that are translated, the translated value (i.e. the value visible to the app user) will register as the default voice command. For example, the voice command for a button with a label as label="{$:t('start_job')}"
will be the "Start Job" translation in the respective language.
JourneyApps provides developers with a Voice Debugger during development. This helps in situations where a RealWear device is not available, or in cases where developers want to quickly see what voice commands are available at any given time for app users.
To open the voice debugger, enroll to your app on web, open the diagnostics view and click on "Voice Debugging". A popup window will open (check that popups are allowed) which lists the available voice commands for users. This list will include automatically and manually registered commands.
Click on a command in the debugger to simulate a voice command.
Known issue
When enrolling in an app on Web with the Voice Debugger enabled, you may need to initially refresh your app's tab for all voice commands to appear in the list.
Automatic voice commands are currently not supported for the following UI components: card
, capture-coordinates
, display-coordinates
, object-list
, power-bi
, sidebar
, typeahead
The object-table
component currently has limited support: read-only tables and their controls (e.g. to paginate, or search) are supported, as well as firing a row-level action. Functionality that is not currently supported includes the ability to edit cells, and to sort or filter columns.
For list
, voice commands are registered for the header
only, and will trigger the list item's associated action.
Overwriting global commands such as "App help" and "Scroll down" is not currently supported. Please let us know via if you have a use case for this.
For the above cases, you should be able to voice commands. Please reach out to us via if you have a voice control use case that is not currently supported.