Migrate from Dragon Medical SpeechKit (Browser edition) to Dragon Copilot SDK for JavaScript

This article outlines the main differences between Dragon Medical SpeechKit (Browser edition) and Dragon Copilot SDK for JavaScript. If you have an existing SpeechKit integration, this article helps you update it efficiently.

Supported environments

The following browsers are supported:

  • Windows - Edge, Chrome, JxBrowser

  • macOS - Edge, Chrome, Safari

  • iOS - WKWebView

Mozilla Firefox isn't supported.

You don't need to enable third-party cookies in the browser.

On-premises deployments aren't supported.

For information on supported microphones, see: Microphones for dictation and Microphones for ambient recording.

New API design

The Dragon Copilot SDK introduces a modernized and streamlined API design.

  • Access all APIs under the dragon namespace. If you include the SDK through a <script> tag, access the APIs by using window.DragonCopilotSDK.dragon.

    Example: window.DragonCopilotSDK.dragon.recording.startRecording(...)

  • The APIs are organized into logical namespaces based on functionality. For example:

    DragonCopilotSDK.dragon.recording
    DragonCopilotSDK.dragon.microphone
    DragonCopilotSDK.dragon.applicationCommands

  • The new API isn't compatible with SpeechKit. As a result, you need to re-implement your integrations using the updated API structure.

Updated SDK initialization

SpeechKit supported two types of initialization: auto-initialization and deferred initialization. Dragon Copilot SDK for JavaScript has a single DragonCopilotSDK.dragon.initialize(options) API that takes all of the options necessary to configure and initialize the SDK. There's no need to implement NUSA_configure or any global functions. This change also means that the integrator is always in control of when the SDK initializes. The initialization options provide much more fine-grained control of the SDK's behavior.

See Initialize Dragon Copilot SDK for JavaScript.

Authentication updates

Organization token (also known as license GUID) authentication isn't supported. See Authentication.

New and updated recording APIs

The Dragon Copilot SDK provides additional APIs for getting the recording volume and for enabling or disabling ambient recording.

See Record audio.

Updated recording UI concept

SpeechKit provided its own built-in UI for the speech bar. The Dragon Copilot SDK provides you with the tools to build your own recording UI according to your requirements, but it doesn't provide a recording UI out of the box.

See:

Improved support for React and Angular

SpeechKit integrators needed to call NUSA_reinitializeVuiForm() whenever speech-enabled elements were added to or removed from the page. This requirement posed challenges, as SpeechKit needed to be notified when elements were inserted into the DOM. Frameworks like Angular and React use a virtual DOM, making it difficult for integrators to determine the exact moment elements become available on screen.

With the Dragon Copilot SDK, this process is significantly simplified. You can now use data attributes to annotate your HTML. The SDK detects when elements are added to or removed from the page without needing to reinitialize. It also detects when data attributes are added and removed, such as data-dragon-container.

See Speech-enable your browser app.

New external controls feature

The Dragon Copilot SDK provides new APIs to speech-enable controls outside the DOM of the speech-enabled web page.

See Speech-enable external controls.

Updated application command APIs

Application commands are now managed using batch update APIs. This eliminates the need to reinitialise the VUI form after each change. However, to maintain optimal performance, all updates should be grouped and submitted as a single batch rather than applied individually.

See Define application commands.

Updated microphone button APIs

Microphone button support no longer requires an extension and uses the browser's WebHID APIs on Google Chrome and Microsoft Edge. Safari doesn't support microphone buttons.

See Handle microphone button events.

New microphone selection APIs

The Dragon Copilot SDK provides new APIs for getting a list of connected devices, finding out which device has the focus, and selecting a preferred device.

For more information, see: Set the preferred microphone.

Updated events

Events now follow the EventTarget interface. This standardized and flexible approach supports multiple listeners.

Events are also organized by namespace, with each namespace exposing its own events object. For example:

  • Recording-related events: DragonCopilotSDK.dragon.recording.events
  • Application command events: DragonCopilotSDK.dragon.applicationCommands.events
  • Application-wide events: DragonCopilotSDK.dragon.events

New field navigation and correction APIs

The Dragon Copilot SDK provides new APIs for navigating and updating fields in Dragon Copilot texts (library items). You can also build a correction menu to display correction alternatives for dictation results.

See:

Removed features

  • Deferred correction and playback workflows aren't supported.
  • Tiny MCE isn't supported.
  • The personalization and help window and its component tabs are no longer available. This change includes the What you can say page, Manage formatting, Manage vocabulary, Manage auto-texts, end user help, and training. Voice commands that open these UI elements in SpeechKit, such as what can I say, make that an auto-text, and open help, aren't functional in Dragon Copilot.

Mapping of SpeechKit APIs to Dragon Copilot APIs

Initialization

SpeechKit API Dragon Copilot API
NUSA_initialize DragonCopilotSDK.dragon.initialize(options)
NUSA_applicationName DragonCopilotSDK.dragon.initialize(options)
NUSA_closeSession DragonCopilotSDK.dragon.destroy()
NUSA_language DragonCopilotSDK.dragon.initilize(options)
DragonCopilotSDK.dragon.speech.updateOptions({language, topic})
NUSA_topic DragonCopilotSDK.dragon.initilize(options)
DragonCopilotSDK.dragon.speech.updateOptions({language, topic})

See Set the language and topic.
NUSA_onInitialized DragonCopilotSDK.dragon.events.addEventListener("initialized",...)
NUSA_getSessionId DragonCopilotSDK.dragon.session.getID
NUSA_service DragonCopilotSDK.dragon.initialize(options)
NUSA_registerCustomControlType DragonCopilotSDK.dragon.initialize(options)
NUSA_closeVuiForm Removed
NUSA_configure Removed
NUSA_Guids Removed
NUSA_initializeVuiForm Removed
NUSA_reinitializeVuiForm Removed
NUSA_isInitialized Removed

Application commands

SpeechKit API Dragon Copilot API
NUSA_createCommandSet DragonCopilotSDK.dragon.applicationCommands.addOrUpdateCommandSets(..)
NUSA_createCommand DragonCopilotSDK.dragon.applicationCommands.addOrUpdateCommands(..)
NUSA_createCommandPlaceholder DragonCopilotSDK.dragon.applicationCommands.addOrUpdateCommandPlaceholders(..)
NUSA_setCommandPlaceholderValues DragonCopilotSDK.dragon.applicationCommands.addOrUpdateCommandPlaceholders(..)
NUSA_clearCommandPlaceholderValues DragonCopilotSDK.dragon.applicationCommands.addOrUpdateCommandPlaceholders(..)
NUSA_enableCommandSet DragonCopilotSDK.dragon.applicationCommands.addOrUpdateCommandSets(..)
NUSA_enableCommand DragonCopilotSDK.dragon.applicationCommands.addOrUpdateCommands(..)
NUSA_onCommandRecognized DragonCopilotSDK.dragon.applicationCommands.events.addEventListener("commandRecognized",..)

Recording

SpeechKit API Dragon Copilot API
NUSA_startRecording DragonCopilotSDK.dragon.recording.startRecording(options)
NUSA_stopRecording DragonCopilotSDK.dragon.recording.stopRecording(options)
NUSA_toggleRecording DragonCopilotSDK.dragon.recording.toggleRecording(options)
NUSA_onRecordingStarted DragonCopilotSDK.dragon.recording.events.addEventListener("recordingStarted", ...);
NUSA_onRecordingStopped DragonCopilotSDK.dragon.recording.events.addEventListener("recordingStopped", ...);
NUSA_setCustomAudioStopDelay Removed

Dictation events

SpeechKit API Dragon Copilot API
NUSA_onProcessingFinished DragonCopilotSDK.dragon.recording.dictation.events.addEventListener("processingFinished", {/* empty */});
NUSA_onProcessingFinishedForElement DragonCopilotSDK.dragon.recording.dictation.events.addEventListener("processingFinishedForElement", { element: HTMLElement });
NUSA_onProcessingStarted DragonCopilotSDK.dragon.recording.dictation.events.addEventListener("processingStarted", {/* empty */});
NUSA_onProcessingStartedForElement DragonCopilotSDK.dragon.recording.dictation.events.addEventListener("processingStartedForElement", { element: HTMLElement });

Microphone button events

SpeechKit API Dragon Copilot API
NUSA_onControlDeviceEventReceived DragonCopilotSDK.dragon.buttonDevice.events.addEventListener
NUSA_ControlDeviceEvent buttonPressed and buttonReleased events

Exported document processing

SpeechKit API Dragon Copilot API
NUSA_cleanupExportedContainer DragonCopilotSDK.dragon.removeInjectedMarkup()

Browser support

SpeechKit API Dragon Copilot API
NUSA_isBrowserSupported DragonCopilotSDK.dragon.isBrowserSupported()

End user help

SpeechKit API Dragon Copilot API
NUSA_OnlineHelpURL Removed

User interface

SpeechKit API Dragon Copilot API
NUSA_onHideViewEvent Removed
NUSA_onShowViewEvent Removed
NUSA_showForm Removed