Share via


Speech-enable a single-page app

If your app enables users to edit multiple documents without reloading the page, Dragon Medical SpeechKit must be notified whenever a document has been finalized and a new one is loaded. Dragon Medical SpeechKit will adapt the user’s profile based on the finalized document and treat the next document loaded in the page as a new document.

Procedure

To inform Dragon Medical SpeechKit that the current document is final and a new document is opened, do the following:

  1. Call NUSA_closeVuiForm().
  2. Load the new document in your page.
  3. Call NUSA_initializeVuiForm().

For more information, see: Single page apps sample.

Important information

  • Calling NUSA_closeVuiForm() stops the recording, discards pending recognition results and hides the speech bar. To avoid losing dictation results, stop recording and wait for the NUSA_onProcessingFinished event before calling NUSA_closeVuiForm().

  • NUSA_initializeVuiForm() will return false if NUSA_closeVuiForm() isn't called first.

  • Call NUSA_reinitializeVuiForm() to reinitialize a document after a layout modification. For more information, see: Reinitialize VUI form sample.