Share via


Speech-enable only specific controls

If your app has sections that you don't want to be speech-enabled, you can integrate Dragon Medical SpeechKit by only speech-enabling specific controls.

To have sections of your app that aren't speech-enabled, do the following:

  1. In your NUSA_configure() function, set NUSA_enableAll="false". None of the controls on your web page are speech-enabled.

  2. Add the attribute data-nusa-enabled="true" to the specific controls that you want to be speech-enabled.

Note

Text controls that are hidden, disabled, read-only or password fields aren't speech-enabled by default. You can set them to be speech-enabled if needed.

Speech-enabling specific controls using NUSA_initialize()

To speech-enable the edit controls in a specific section of your web page, call NUSA_initialize(parent-element). For example:

NUSA_initialize(document.getElementById("speechFormsContainer1"));
// Dragon Medical SpeechKit will only parse child elements of speechFormsContainer1.

To speech-enable an array of edit controls, call NUSA_initialize(elements). For example:

var childElements = [];
childElements.push.apply(childElements, document.getElementById("speechFormsContainer1").getElementsByTagName("*"));
childElements.push.apply(childElements, document.getElementById("speechFormsContainer2").getElementsByTagName("*"));
return NUSA_initialize(childElements);
// Dragon Medical SpeechKit will only parse the elements passed to the function.