Share via


Application commands

You can define voice commands for your users. These application commands are specific to your app and how you want your users to interact with it.

Application commands can be used to:

  • Control GUI elements: For example, the user says save report instead of selecting the Save button.
  • Control workflows: For example, the user says 'show my last 5 reports for mister Brown' instead of browsing through lists.

Application command sets

Each application command is associated with a command set. Application commands in the same set are displayed in the same section of the personalization & help window. Command sets can be enabled or disabled; if you disable a command set, all application commands in the set become inactive and they're no longer recognized until enabled again. You can use command sets to group related application commands together in order to enable and disable them depending on what the end user currently sees on the app UI or which app workflows are available to them.

Using application commands

Any active application command can be used by the end user whenever recording is on. Your app is notified via an event when an application command is recognized.

If no text controls are speech-enabled but application commands have been defined, the speech bar is always displayed and the user can start recording at any time.

Phrases and display strings

Application commands are defined by providing an application command phrase. Phrases describe what the end user needs to say in order to trigger a command event in your app. Phrases should always reflect the pronunciation of an application command; to display the actual phrase to the end user, you can use the display string. You can define more than one phrase: a main phrase and alternatives. The phrase should be intuitive for the user. For example, the main phrase save report has an alternative click save.

When you define an application command, Dragon Medical SpeechKit generates a phonetic transcription of the phrase. In some cases, how a phrase is written and how it's pronounced are very different. In this case, you can define a display string to be used in the personalization & help window and the phrase provides pronunciation data. For example, the personalization & help window displays Worcester (the display string) and the user says wooster'* (the phrase).

You can define a display string for the main phrase and different display strings for all alternative phrases. If you define a display string for a phrase that's identical to the display string for another phrase, it will only be displayed once in the personalization & help window.

Only alphabetic characters can be used in phrases; special characters aren't allowed.

Examples

How it's pronounced(phrase) How it's written(display string)
coo detah coup d'etat
wooster Worcester
nazdack NASDAQ
megabyte MB
C four C4
U S Aunited states of America USA
income slash expenditure income/expenditure
Doctor Dr.

Recommendations

  • We recommend using a distinctive phrase so that it can't be misinterpreted as speech to be recognized. This helps to ensure that it's correctly executed. If commands are still recognized as speech too often, consider using a unique prefix for all commands (such as the name of your app).

  • Define commands that encourage the user to speak naturally.

For example, you want to define a command that opens the ROS tab in your app and places the cursor in a text field ready for dictation. Use document R O S, dictate R O S and write R O S rather than select the R O S tab.

  • Use simple phrases that are intuitive and easy to pronounce.

  • Don't implement application commands that the Dragon Medical system already provides as standard voice commands. When this happens, the standard command has priority.

  • For acronyms that are spelled out, use capital letters separated by spaces.

  • When you define the spoken phrase, don't use:

    Very short phrases (such as one syllable only); this can cause the command to be recognized when the user didn't intend it.

    Capital letters; for example, use assessment and plan, not ASSESSMENT AND PLAN. Exception: For acronyms, use capital letters separated by spaces; for example, C I A.

    Abbreviations; for example, Dr.

    Digits; use twelve and not 12.

    Punctuation marks; for example, ", !, ?, etc.

    Symbols; for example, +, -, &, $, etc.

Placeholders

Application commands can include placeholders in the phrase. The actual values for the placeholders need to be added by your app programmatically. Placeholders are displayed in the personalization & help window as a single word in angled brackets; the displayed string can be different from the placeholder ID used in the command phrase.

Note

It's not possible to use the same placeholder more than once in a voice command.

The following types of placeholder can be used:

  • Standard placeholders delivered with Dragon Medical SpeechKit: These are prefixed with standard; for example, show lab results from <standard:date>.

  • App-defined placeholders: For example, you define the placeholder <patient> with the values "Mr. Pink", "Mr. Orange", "Mr. Blue", "Mr. Purple", "Mr. Green"; the values are dynamically set at runtime. The user sees the application command show lab results for <patient> in the personalization & help window and says show lab results for mister pink.

The app will be informed about the values for all placeholders used within a command via the command’s event.

Warning

If the placeholder included in an application command is undefined or contains invalid characters (for example, angled brackets), the application command won't be recognized. Make sure to test application commands that include placeholders in all relevant use cases.

Standard placeholders

The following standard placeholders are available:

Standard placeholder Description Key
<standard:cardinal0-100> The user can say a cardinal number from 0 to 100; for example, forty two. The placeholder value returned in the command event will be the corresponding cardinal number 42. standard_cardinal0-100
<standard:ordinal1-12> The user can say an ordinal number from 1 to 12; for example, sixth. The placeholder value returned in the command event will be the corresponding cardinal number 6. standard_ordinal1-12
<standard:date> The user must say the month and the day, saying the year is optional. If the year isn't specified, the closest year from the current date will be used (going forwards/backwards 6 months). The placeholder value returned in the command event will be the string YYYY-MM-DD. standard_date

See also