Feature availability:
/transcribe
/streams
/transcripts
API Definitions
Commands are set in dictation configuration when directly calling the/transcribe API or when using the Dictation Web Component.
Explanation of parameters used in /transcribe command configuration:
| Parameter | Type | Definition |
|---|---|---|
| id | string | Identifier for the command when it is detected by the speech recognizer. |
| phrases | array | Word sequence that is spoken to trigger the command. |
| variables | array | Placeholder in command phrases to define one or more words that can trigger the command. Variables can be defined as an enum list or open-ended wildcards. |
Commands with enum Variables
When configured commands are recognized by the server, the command object will be returned over the web socket (as opposed to the transcript object for speech recognized text), which includes the command ID and variables that the integrating application uses to execute the defined action.
Below are some examples, including both the request configuration and server response.
Constraints
- A single command should not have a mixture of phrases with and without variables - all phrases defined for a commands including a variable must use the variable in the phrase.
- All variables defined for a command should be used in command phrases
- Client applications are responsible for management and execution of the actions to be triggered by recognized commands.
Enum Command Examples
Note that the
id, phrases, and variables shown below are mere examples. Define these values as needed for your own commands.Navigation
Navigation
Select Text
Select Text
Command to select text in the editor. The command includes a defined list of words that can be recognized for the
select_range variable. Your application can define different delete actions for each of the options, or add more complex handling for selecting specific words mentioned in the command utterance.Delete Text
Delete Text
Command to delete text. The command includes a defined list of words that can be recognized for the
delete_range variable. Your application can define different delete actions for each of the options!Epic SmartPhrase
Command to insert an Epic SmartPhrase to pull in pre-defined text or structured data. See more about this Epic feature here.Putting it All Together
The three commands defined above can be combined into one dictation configuration with accompanying Javascript to execute the actions.SDK Integration
SDK Integration
The below example includes
navigation commands to move between sections within the SOAP note template, delete text command to remove last word, sentence, or paragraph, and select text commands to select text within the active text field:Commands with Wildcard Variables
Unlikeenum variables that are defined as part of the command configuration, wildcard variables provide the ability to recognize a command based on undefined, open-ended text.
Constraints
When usingwildcard variables, the following rules apply:
Configuration:
- Trigger word required: A wildcard variable must be preceded by at least one literal word. Phrases may not begin with a wildcard variable.
- Separated by literals: Multiple wildcard variables in a single phrase must be separated by a non-empty literal string (e.g.
"select {text1} end select {text2}"is valid;"{text1} {text2}"is not). - No
enumfield: Wildcard variables do not use anenumlist — omit theenumfield whentypeis"wildcard".
Recognition:
- A literal trigger word is required before defining a wildcard variable, such as “select” or “insert before”.
- 2 seconds of silence must precede and follow the command phrase
- Wildcard variables can support a maximum of 10 words to be recognized following the literal trigger text. When the word cap is reached without a following literal endpoint, the command fires automatically with the accumulated words as the variable value.
- Commands with wildcard variables are recognized after commands with enumerated variables, so that defined matches are recognized first when there are overlapping phrase terms defined.
The 2 second silence buffer and max word limit constraints are server-side defaults. Review and refinement of these values are in progress. contact us to share details about your implementation, or for more information
Wildcard Command Examples
Literal endpoint: select {utterance} end select
Literal endpoint: select {utterance} end select
Adding a literal word at the end of the phrase creates an endpoint — the wildcard captures everything spoken between the trigger and the endpoint.
Multiple wildcards: insert {content} before {target}
Multiple wildcards: insert {content} before {target}
Two wildcard variables in a single phrase must be separated by a non-empty literal string — here
"before" acts as the separator.Mixed wildcard and enum: select {text} and {operation}
Mixed wildcard and enum: select {text} and {operation}
Wildcard and
enum variables can be combined in a single phrase. Enum variables are always matched first, so the wildcard captures whatever is spoken between the trigger and the recognized enum value.Putting it All Together
Using the “select_text” command to replace text existing in the document:Integrated Workflow Sequence
Integrated Workflow Sequence
Speech
Dictation: “The patient is a forty year old male comma here today for annual well visit period he is known to have diabetes and hypertension and his last fasting A1c was six point eight percent period”STT response
Transcript: “The patient is a 40-year-old male, here today for annual well visit. He is known to have diabetes and hypertension and his last fasting A1c was 6.8%.”Additional Information
Best Practices
Click here for more info on how to build commands effectively.More Examples
Click here for a library of command configurations ready for use.Use of commands is optional for dictation configuration. They should be configured based on how the integrating application will perform the actions.Please contact us to report errors, or for more information on this feature.