Setting up Dragon Medical SpeechKit (Android)
Requirements
Development requirements
- Android SDK
- Java Development Kit (JDK)
- Android Studio
Runtime requirements
- Android
- Dragon Medical SpeechKit requires Nearby devices permissions to use Bluetooth microphones. The following permissions must be declared in your AndroidManifest.xml file:
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
Your app must request Nearby devices permission using the Android requestPermission()
API and handle the user's response using the Android onRequestPermissionResult()
API callback. For more information, see: https://developer.android.com/develop/connectivity/bluetooth/bt-permissions#declare-android12-or-higher
If the user denies the permission, the microphone will be off. Speech recognition won't be available until the user grants the permission.
For more information on supported and recommended Android versions 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
The Dragon Medical SpeechKit package contains:
- Java AAR package of the SDK code (NuanceSpeechAnywhere.aar)
- SDK documentation and samples
Including Dragon Medical SpeechKit in your app
To include Dragon Medical SpeechKit in your app, do the following:
- In your Android Studio project, go to the File menu and select New > New Module.
- Select Import JAR/AAR Package > Next.
- Select the .aar file in the File Name field and select Finish.
- Add a dependency to the Dragon Medical SpeechKit SDK in your integration's main module:
Add line
implementation project (':NuanceSpeechAnywhere')
in theDependencies
section of the module's build.gradle file and synchronize gradle files.
Alternatively, select and hold (or right-click) your module and select Open Module Settings > Dependencies. On the Dependencies tab, select the plus icon +. Select Module Dependency > NuanceSpeechAnywhere > OK.
If your app targets Android 5.1 or lower (targetSdkVersion 22 or lower), add a dependency to the v4 Support library revision 23 or higher; for example: com.android.support:support-v4:23.2.0