Set up Dragon Medical SpeechKit (.NET)

Requirements

For more information on supported software versions, see the corresponding release notes.

Important: Spell checkers or other infrastructure that modifies text while speech recognition is active might cause speech recognition results to be inserted at an unexpected location. Make sure to deactivate spell checkers or such infrastructure in your integration.

Package contents

Dragon Medical SpeechKit contains:

SDK binaries

SDK samples

API Reference documentation and SDK documentation

x64 and x86 SDKs

SDK binaries are built for specific architectures and the corresponding one must be used:

  • Use the x64 SDK if you're building your app as x64.
  • Use the x86 SDK if you're building your app as x86.

When compiling, we recommend using the corresponding x64 and x86 platform target. The use of anycpu won't resolve app configuration issues from the use of the x64 SDK with an x86 project or vice versa. For more information, see </dotnet/csharp/language-reference/compiler-options/output>.

Referencing Dragon Medical SpeechKit

To use Dragon Medical SpeechKit in your app, add a reference to the Nuance.SpeechAnywhere.dll assembly to your Visual Studio .Net application project.

Enabling microphone button support

For more information, see Microphone button handling.

To support Nuance PowerMic and Philips SpeechMike buttons, add the following dependencies to your app's manifest file:

  • For x86 apps:

    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Nuance.PowerMic"
                version="<Nuance.PowerMic assembly version>"
                processorArchitecture="x86"/>
        </dependentAssembly>
    </dependency>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Philips.SpeechMike"
                version="<Philips.SpeechMike assembly version>"
                processorArchitecture="x86"/>
        </dependentAssembly>
    </dependency>
    
  • For x64 apps:

    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Nuance.PowerMic"
                version="<Nuance.PowerMic assembly version>"
                processorArchitecture="amd64"/>
        </dependentAssembly>
    </dependency>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Philips.SpeechMike"
                version="<Philips.SpeechMike assembly version>"
                processorArchitecture="amd64"/>
        </dependentAssembly>
    </dependency>
    
    

Remarks

  • If you're using Philips SpeechMike, we recommend always installing the latest SpeechMike firmware.
  • Nuance supports the use of Dragon Medical SpeechKit in combination with the Nuance.PowerMic and Philips.SpeechMike assembly versions distributed with that Dragon Medical SpeechKit package. Newer versions that the vendor guarantees to be binary backwards compatible can also be used.
  • The GetAudioDevices() function and the AudioDevice property are deprecated. It's still possible, but not recommended to use them on the shared session object to retrieve the available audio devices and override the default device.
  • The user can select a microphone via the user interface. The selected microphone will be remembered for the user and given precedence over any integration-defined audio device. For more information, see the 'Speak' topic of the integrated end user help.

Deploying Dragon Medical SpeechKit with your app

Copy the contents of the Dragon Medical SpeechKit package bin folder to your app directory. Also copy the contents of the SpeechMagic.AudioFull package here, if necessary (see above).

Publishing a Microsoft Windows ClickOnce app

To publish the S_DM_SpeechKit sample project (or your app based on Dragon Medical SpeechKit) as a Microsoft Windows ClickOnce app, do the following:

  1. In the Visual Studio Solution Explorer, open the S_DM_SpeechKit sample project.

  2. In app.manifest, remove the SpeechMagic.DictationDevices, Philips.SpeechMike and Nuance.PowerMic dependencies.

  3. Select and hold (or right-click) the S_DM_SpeechKit sample project and select Add reference; the Reference Manager dialog box is displayed.

  4. Select Nuance.PowerMic.manifest, Philips.SpeechMike.manifest and SpeechMagic.DictationDevices.manifest.

  5. Select and hold (or right-click) the S_DM_SpeechKit sample project and select Properties.

  6. On the Security tab, select Enable ClickOnce security settings.

  7. On the Publish tab, enter the Publishing Folder Location (web site, ftp, or file path) and Installation Folder URL (if different than above) and select Publish Wizard.

  8. Follow the wizard to decide where the app will be installed from and if the app will be available offline or online only.

  9. Select and hold (or right-click) the S_DM_SpeechKit sample project, select Add > Existing Item and add the following files to your project:

    • From the Philips.SpeechMike folder: PIA.SpMikeCtrl.dll
    • From the bin folder: NuCaAudioController.dll, NuCaAudioController.ini, NuCaAudioControllerCLI.dll, NuCaClient.cfg, NuCaStreamDrv.dll, pspapdrv.dll, pspaudrv.dll, pspsbext.dll, SmAudioDrv.dll, SmAudioDrv.ini, ncaaudiodev.ini, PIA.SmXAudioLib.dll, SmControlDrv.ini, smxlog.ini.template and SpeexLicense.txt
  10. Select Publish Now to build your ClickOnce app.

Sharing assemblies with Dragon Medical SpeechKit

If your app depends on a third party assembly (for example, log4net) which is also used by Dragon Medical SpeechKit, no action is required if it uses the same version of the assembly.

If your app uses a different version of the assembly, and the newer version of the shared assembly is fully binary compatible with the older one, you must deploy the newer version of the assembly along with your app and verify that the .NET assembly loader accepts and loads that version instead of the older one. To do this, add the following to your app’s manifest file for every shared assembly:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="<name>" publicKeyToken="<publicKeyToken value>" />
            <bindingRedirect oldVersion="<oldVersion value>" newVersion="<newVersion value>" />
        </dependentAssembly>
    </assemblyBinding>
</runtime>

In the above code snippet, replace <name>, <publicKeyToken value>, <oldVersion value> and <newVersion value> by values that are applicable to the shared assembly.

Note

If the newer version of the shared assembly is not fully binary compatible with the older one, you must deploy both versions of the assembly (in separate subfolders) along with your app and programmatically load the right version. For more information, see: https://msdn.microsoft.com/library/ff527268(v=vs.110).aspx.

See also

Technical restrictions