Pair with the mobile mic

Dragon Copilot's mobile mic feature enables users working with Dragon Copilot in a desktop app to record audio using their mobile phone. The user's mobile phone audio is paired with their desktop session and they see the Dragon Copilot results on their desktop.

To do this, the user needs to sign in to Dragon Copilot on their mobile device and sign in to another instance of Dragon Copilot on their desktop using the same Microsoft account. This works as follows:

  • The user signs in to Dragon Copilot on the desktop and selects Mobile mic as the preferred microphone.

  • The same user signs in to Dragon Copilot on the mobile device and selects the Mobile mic option.

  • The mobile and desktop instances of Dragon Copilot pair with each other. When the user wants to record, they select the record button on either the desktop or mobile device. Audio is sent to Dragon Copilot from the mobile app and linked to the current Dragon Copilot session on the desktop.

  • Signing out of either instance stops pairing.

For end user instructions on microphone selection, including mobile mic usage with the Microsoft standalone apps, see Select and configure your microphone.

Pair your desktop app with the mobile mic

Dragon Copilot SDK for JavaScript provides you with APIs that you can use to pair your desktop browser app with Dragon Copilot in mobile mic mode on the mobile device.

For detailed information, see the API reference.

Enable mobile mic on initialization

To switch on the mobile mic feature, initialize the Dragon Copilot SDK with InitializationOptions.systemFeatures.enableRemoteMicrophone set to true.

This adds the mobile mic to the list of available devices that the Dragon Copilot SDK sends to your integration with the microponeListChanged event. You can then display Mobile mic as a microphone option to users. For more information on getting a list of microphones and enabling microphone selection, see Enable microphone selection.

Add mobile mic event listeners

To add listeners for mobile mic events, call DragonCopilotSDK.dragon.microphone.mobileMic.events.addEventListener.

To remove mobile mic event listeners, call DragonCopilotSDK.dragon.microphone.mobileMic.events.removeEventListener.

Details in the event include the following:

Event Description
pairingStatusChanged Dispatched when the pairing status of the mobile mic has changed.
remoteClientEventOccurred Dispatched when a remote client event occurred.

The pairing status can be one of the following:

Status Description
unpairedSessionNotOpened Mobile mic isn't paired because the server session isn't open.
unpairedSessionClosed Mobile mic isn't paired because the server session is closed.
unpairedPairingFailed Mobile mic isn't paired because the pairing has failed.
pairing Mobile mic pairing is in progress.
paired Mobile microphone is paired.

Start pairing

When the end user selects the mobile mic from the list of available microphones, the Dragon Copilot SDK initiates pairing automatically. Your app should display the pairing status to the user based on the pairingStatusChanged event. If the user is signed in to Dragon Copilot on their mobile device and selects the mobile mic option, the two instances of Dragon Copilot will pair; the mobile device now functions as a microphone for dictation or ambient recording, and the results can be delivered to the desktop instance.

In some cases, for example if automatic pairing fails, it might be necessary for your app to start pairing programmatically. To do this, call DragonCopilotSDK.dragon.microphone.mobileMic.startPairing.

To stop pairing, call DragonCopilotSDK.dragon.microphone.mobileMic.stopPairing.

Enable remote mic functionality in your mobile app

The Dragon Copilot SDK also provides APIs to enable your mobile app to function as a mobile mic, so that desktop instances of Dragon Copilot can pair with it.

Switch app client type

To switch your app from VUI (voice user interface, i.e. the client that receives the recognized text) mode to audio mode (mobile mic), use the DragonCopilotSDK.dragon.microphone.mobileMic.switchClientType API.

Supported client types

Client type Description
Undefined Default mode for the Dragon Copilot SDK. A single instance of the Dragon Copilot SDK where the user both records audio and carries out speech-enabled workflows.
VuiForm The app only displays the UI. The audio needs to be supplied by the mobile mic.
Audio Mobile mic functionality - the app only records audio.

Send mobile mic key event

To send a key press/release event from the mobile mic to the paired desktop app, use the DragonCopilotSDK.dragon.microphone.mobileMic.sendKeyEvent API.

This API will send a key press/release event from the mobile mic to the UI (for example, Dragon Copilot web). A fixed key-action mapping is currently implemented:

Key name Action
RECORD Press and hold to dictate audio.
PLAY Toggle ambient recording on and off.
ENTER_SELECT Accept default values of fields in texts.
FORWARD Select the next text field.
REWIND Select the previous text field.
TAB_BACKWARD Move text cursor to the previous edit control.
TAB_FORWARD Move text cursor to the next edit control.
TRANSCRIBE Transfer text from the dictation clipboard to the app.
F1_A None
F2_B Anchor/release the speech focus.
F3_C None
F4_D None

For more information on microphone button events, see Handle microphone button events.

Send remote client event

To send a custom message from the desktop app to the mobile mic, use the to the DragonCopilotSDK.dragon.microphone.mobileMic.sendRemoteClientEvent API. You can use this, for example, to sync remote app logic, such as button status.

See also

API reference