Set up Dragon Medical SpeechKit (iOS)
Requirements
Development requirements
- iOS SDK
- Xcode
Runtime requirements
- iOS
For more information on supported and recommended Xcode development environments and architecture compatibility, see the release notes delivered with the product.
Warning
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 documentation
- Samples contains:
Source code for the sample integration of Dragon Medical SpeechKit.
Installing the Dragon Medical SpeechKit documentation
The Dragon Medical SpeechKit documentation is provided as a documentation set that can be displayed from within the Xcode environment. To enable Xcode to find the documentation, do the following:
- Browse for the Dragon Medical SpeechKit documentation set in the DragonMedicalSpeechKit/Documentation directory.
- Copy the documentation set (the com.nuance.DragonMedicalSpeechKit.docset file) to: ~/Library/Developer/Shared/Documentation/DocSets
- Restart Xcode.
To view the documentation, open the Xcode help browser (Help > Documentation and API Reference) and select Explore Documentation.
Adding Dragon Medical SpeechKit to your app
Dragon Medical SpeechKit is available as a Swift package at https://github.com/nuance-communications/Dragon-Medical-SpeechKit-iOS.
Note
Dragon Medical SpeechKit is no longer delivered as an embedded framework or as an XCFramework. If you were using an earlier version of the SDK as an embedded framework or XCFramework and need to switch to the Swift package, you must first remove/unlink the embedded framework/XCFramework from your project.
To add the Swift package to your project, do the following:
In the Xcode Projects and Targets list, select your project, then select the Package Dependencies tab.
Select + in the lower left corner of the Package Dependencies section to add a new package.
In the search bar, enter the repository URL: https://github.com/nuance-communications/Dragon-Medical-SpeechKit-iOS
In the Dependency Rule menu, select Exact version and confirm the version number corresponds to the Dragon Medical SpeechKit version you want to add.
Select Add Package.
In the Choose Package Products window, select Dragon-Medical-SpeechKit-iOS and choose your target, then select Add Package. Xcode will resolve the SpeechKit package and add it to your selected target. You should see Dragon-Medical-SpeechKit-iOS listed in your package dependencies.
To import the package, add the import statement to your code:
Swift:
import DragonMedicalSpeechKit
Objective C:
@import DragonMedicalSpeechKit;
For more information on working with Swift packages, see: https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app
Enabling Dragon Medical SpeechKit to access the microphone
To enable access to the microphone, add the NSMicrophoneUsageDescription
key and a meaningful description to your app's info.plist file. For example:
NSMicrophoneUsageDescription - Used for speech recognition
Important
Your app will stop working immediately if access to the microphone isn't enabled and the user starts recording.
Compiling the Dragon Medical SpeechKit sample apps
- Copy the Samples folder to a local drive.
- Compile for the iPhoneSimulator SDK.