Skip to main content

Orca Streaming Text-to-Speech Engine Python Demo

Made in Vancouver, Canada by Picovoice

Orca

Orca is an on-device streaming text-to-speech engine that is designed for use with LLMs, enabling zero-latency voice assistants. Orca is:

  • Private; All speech synthesis runs locally.
  • Cross-Platform:
    • Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64, arm64)
    • Android and iOS
    • Chrome, Safari, Firefox, and Edge
    • 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 pvorcademo

AccessKey

Orca requires a valid Picovoice AccessKey at initialization. AccessKey acts as your credentials when using Orca 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

Orca supports two modes of operation: streaming and single synthesis.

In the streaming synthesis mode, Orca processes an incoming text stream in real-time and generates audio in parallel. This is demonstrated in the Orca streaming demo.

In the single synthesis mode, the text is synthesized in a single call to the Orca engine.

Streaming synthesis demo

In this demo, we simulate a response from a language model by creating a text stream from a user-defined text. We stream that text to Orca and play the synthesized audio as soon as it gets generated.

To run it, execute the following:

orca_demo_streaming --access_key ${ACCESS_KEY} --model_path ${MODEL_PATH} --text_to_stream ${TEXT}

Replace ${ACCESS_KEY} with your AccessKey obtained from Picovoice Console, ${MODEL_PATH} with a path to any of the model files available under lib/common, and ${TEXT} with your text to be streamed to Orca. Please note that this demo was not tested on macOS.

Single synthesis demo

To synthesize speech in a single call to Orca and without audio playback, run the following:

orca_demo --access_key ${ACCESS_KEY} --model_path ${MODEL_PATH} --text ${TEXT} --output_path ${WAV_OUTPUT_PATH}

Replace ${ACCESS_KEY} with yours obtained from Picovoice Console, ${MODEL_PATH} with a path to any of the model files available under lib/common, ${TEXT} with your text to be synthesized, and ${WAV_OUTPUT_PATH} with a path to a .wav file where the generated audio will be stored as a single-channel, 16-bit PCM .wav file.

Metadata

Release files for pvorcademo 3.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pvorcademo 3.2.0
File Size Uploaded Provenance Actions
pvorcademo-3.2.0.tar.gz 12.7 kB Without provenance Details for pvorcademo-3.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pvorcademo 3.2.0
File Interpreter ABI Platform Actions
pvorcademo-3.2.0-py3-none-any.whl Python 3 none any Details for pvorcademo-3.2.0-py3-none-any.whl

Total release size: 25.3 kB

Release files / pvorcademo-3.2.0.tar.gz

Download URL pvorcademo-3.2.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4c4e9d93f0b9bab89f247cfba1a01bd40aafc1d72aae6f1de681ed1ebd3894a2
BLAKE2b-256 checksum
How to use checksums
6b5727413772de8dccb6a9e0bf70a7cb919ed77199e656a7b1422b1209ab783e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / pvorcademo-3.2.0-py3-none-any.whl

Download URL pvorcademo-3.2.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcd138bc505a626c732acfee9614a31e9d79eb3c9d95a9ccdd058e709d272326
BLAKE2b-256 checksum
How to use checksums
106a2d0e5cd932c79d07d50540b3f5a2f90a038cf9ff4d522ae60f2bc86a9ca7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for pvorcademo 3.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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