Skip to main content

Zebra Translate

Project description

Zebra Binding for Python

Zebra Translate

Made in Vancouver, Canada by Picovoice

Zebra is a lightweight, on-device neural machine translation engine. Zebra is:

  • Private; All processing runs locally.
  • Cross-Platform:
    • Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64)
    • Raspberry Pi (3, 4, 5)

Compatibility

  • Python 3.9+
  • Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64), and Raspberry Pi (3, 4, 5).

Installation

pip3 install pvzebra

AccessKey

Zebra requires a valid Picovoice AccessKey at initialization. AccessKey acts as your credentials when using Zebra SDKs. You can get your AccessKey for free. Make sure to keep your AccessKey secret. Signup or Login to Picovoice Console to get your AccessKey.

Usage

Create an instance of the engine and translate some text:

import pvzebra

handle = pvzebra.create(access_key='${ACCESS_KEY}', model_path='${MODEL_PATH}')

translation = handle.translate('${TEXT}')
print(translation)

Replace ${ACCESS_KEY} with yours obtained from Picovoice Console, ${MODEL_PATH} with a supported translation model located here and ${TEXT} with the text to translate. Finally, when done be sure to explicitly release the resources using handle.delete().

Translation Models

Zebra translation models are located here. The selected model decides the source and target translation languages.

The format of the model follows:

zebra_params_${SOURCE}_${TARGET}.pv

Where ${SOURCE} is the language code of the source language and ${TARGET} is the language code of the target language for the translation.

Demos

pvzebrademo provides command-line utilities for translating text using Zebra.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pvzebra-1.0.0.tar.gz (11.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pvzebra-1.0.0-py3-none-any.whl (11.9 MB view details)

Uploaded Python 3

File details

Details for the file pvzebra-1.0.0.tar.gz.

File metadata

  • Download URL: pvzebra-1.0.0.tar.gz
  • Upload date:
  • Size: 11.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for pvzebra-1.0.0.tar.gz
Algorithm Hash digest
SHA256 df23eed4424edca198da3762bd21f7094cbb0d73d51f37a613e4e0560884a5c8
MD5 60ba659c6ce3532fcdda35a9c9c596e6
BLAKE2b-256 930f31d17503ab4decb3400f5c2791f8f0d9d0d45048361826f2622f29558b6e

See more details on using hashes here.

File details

Details for the file pvzebra-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pvzebra-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for pvzebra-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7f527628174b3c0fae23905ce973feac288a223d40c4ba21cebb9c06fde908f5
MD5 8d136ef2c2d0825e607d8b81c267a1cc
BLAKE2b-256 5fcd42f09d8c4d8f57b6bb4512351d085351a18f41ab86773f20815067b594f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page