SDK Installation

It is recommended that users obtain the Speech SDK via Maven. Simply make this addition to your project build.gradle to define the Vuzix repository.

Java

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.

Java

dependencies {
implementation 'com.vuzix:sdk-speechrecognitionservice:1.95'
}


Proguard Rules

If you are using Proguard you will need to prevent obfuscating the Vuzix Speech SDK. Failure to do so will 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.

Java

# 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.

Java

android.enableR8=false


Did this answer your question?