Zebra Translate
iOS Quick Start
Platforms
- iOS (16.0+)
Requirements
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your AccessKey.
Make sure to keep your AccessKey secret.
Quick Start
Setup
Install Xcode.
Import the Zebra-iOS package into your project.
To import the package using SPM, open up your project's Package Dependencies in Xcode and add:
To import it into your iOS project using CocoaPods, add the following line to your Podfile:
Then, run the following from the project directory:
Usage
Create an instance of Zebra Translate:
Read more about how to select a model in the Translation Models section.
Translate text:
Release resources explicitly when done with Zebra Translate:
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 iOS 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
Replace
"${YOUR_ACCESS_KEY_HERE}"in the file ViewController.swift with a validAccessKey.Open
ZebraDemo.xcodeprojin Xcode.Go to
Product > Schemeand select the scheme for the language pair you would like to demo (e.g.enfrDemo-> English to French translation demo).Run the demo with a simulator or connected iOS device.