Zebra Translate
Web Quick Start
Platforms
- Chrome & Chromium-based browsers
- Edge
- Firefox
- Safari
Requirements
- Picovoice Account and AccessKey
- Node.js 18+
- npm
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your AccessKey.
Make sure to keep your AccessKey secret.
Quick Start
Setup
Install Node.js.
Install the Zebra Translate Web package:
Usage
Put the model file in the project's public directory or generate a base64 model using the built-in script:
Create a ZebraWorker instance using a base64 model or a model hosted in a public directory:
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 Web SDK, there is a Web demo project available on the Zebra Translate GitHub repository.
Setup
Clone the Zebra Translate repository from GitHub:
Usage
- Install dependencies and run:
- Run the demo with the
startscript with two language codes to start a local web server hosting the demo of your choice (e.g.en-> English,fr-> French). To see a list of available language pairs, runstartwithout a language code.
- Open http://localhost:5000 to view it in the browser.