- Print
- DarkLight
It is recommended that users obtain the Speech SDK via Jitpack. Simply make this addition to your project build.gradle to define the Vuzix repository.
allprojects {
repositories {
google()
jcenter()
// The speech SDK is currently hosted by jitpack
maven { url "https://jitpack.io" }
}
}
Then add a dependency to the Speech SDK library in your application build.gradle
dependencies {
// To maintain consistency, configure this project to use the latest such as:
// implementation 'com.vuzix:sdk-speechrecognitionservice:VERSION'
implementation 'com.vuzix:sdk-speechrecognitionservice:1.97.1'
}
The latest verision is:
Proguard Rules
If you are using Proguard you may need to prevent obfuscating the Vuzix Speech SDK. Failure to do so could result in calls to the SDK raising the RuntimeException "Stub!". Add the following -keep statement to the proguard rules file, typically named proguard-rules.pro.
# Vuzix speech recognition requires the SDK names not be obfuscated -
keep class com.vuzix.sdk.speechrecognitionservice.** { *; }
The R8 Optimization may omit arguments required by the SDK methods, resulting in the NullPointerException "throw with null exception" being raised. The current workaround is to disable R8 and use Proguard to do the shrinking and obfuscation. Add the following to your gradle.properties to change from R8 to Proguard.
android.enableR8=false