Skip to main content

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.

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.1.0.tar.gz (12.9 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.1.0-py3-none-any.whl (13.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pvzebra-1.1.0.tar.gz
  • Upload date:
  • Size: 12.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for pvzebra-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3265048e76362cf31db7c34731deff44e483d04b94cf07c9022ac351b1b437c3
MD5 d5991df55eb4cdbe2e0b8189383091f3
BLAKE2b-256 43f154f232d3a9cacb25f8671618a13f2789ba797561e1acef53660d36b970d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pvzebra-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for pvzebra-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e899218024676610dadec7d60e42b9e66422449a93fe8d04b9308e447b86a2f
MD5 79ce3e825dae76a57ee3f302ad0b758a
BLAKE2b-256 c2afee448928c99b8a31f151c605fb68192f7d0e5790c4ba5e14562c09123232

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page