Zebra Translate
Android Quick Start
Platforms
- Android (5.0+, API 21+)
Requirements
- Picovoice Account and AccessKey
- Android Studio
- Android device with USB debugging enabled or Android simulator
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your AccessKey.
Make sure to keep your AccessKey secret.
Quick Start
Setup
Install Android Studio.
Include
mavenCentral()repository in the top-levelbuild.gradle. Then add the following to the app'sbuild.gradle:
- Add the following to the app's
AndroidManifest.xmlfile:
Usage
Create an instance of Zebra Translate:
Read more about how to select a model in the Translation Models section.
Translate text:
When done, release resources explicitly:
Translation Models
Supported Zebra translation models are located in our GitHub repository. The selected model decides the source and target translation languages.
The format of the model follows:
Where ${SOURCE} is the language code of the source language and ${TARGET} is the language code of the target language for the translation.
Demo
For the Zebra Translate Android SDK, we offer a demo application that demonstrates how to use the Translate engine.
Setup
Clone the Zebra Translate repository from GitHub using HTTPS:
Usage
- Open the Android demo using Android Studio.
- Copy your
AccessKeyfrom Picovoice Console into theACCESS_KEYvariable in MainActivity.java. - Go to
Build > Select Build Variant...and select the language pair you would like to run the demo with (e.g.enfrDebug-> English to French translation demo) - Run the application using a connected Android device or using an Android simulator.