Skip to main content

Picovoice is an end-to-end platform for building voice products on your terms.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Picovoice

Made in Vancouver, Canada by Picovoice

Picovoice is an end-to-end platform for building voice products on your terms. It enables creating voice experiences similar to Alexa and Google. But it entirely runs 100% on-device. Picovoice is

  • Private: Everything is processed offline. Intrinsically HIPAA and GDPR-compliant.
  • Reliable: Runs without needing constant connectivity.
  • Zero Latency: Edge-first architecture eliminates unpredictable network delay.
  • Accurate: Resilient to noise and reverberation. It outperforms cloud-based alternatives by wide margins *.
  • Cross-Platform: Design once, deploy anywhere. Build using familiar languages and frameworks.

Compatibility

  • Python 3.5+
  • Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (all variants), NVIDIA Jetson (Nano), and BeagleBone.

Installation

pip3 install picovoice

AccessKey

Picovoice requires a valid Picovoice AccessKey at initialization. AccessKey acts as your credentials when using Picovoice 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 a new instance of Picovoice runtime engine

from picovoice import Picovoice

access_key = "${ACCESS_KEY}" # AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)

keyword_path = ...

def wake_word_callback():
    pass

context_path = ...

def inference_callback(inference):
    # `inference` exposes three immutable fields:
    # (1) `is_understood`
    # (2) `intent`
    # (3) `slots`
    pass

picovoice = Picovoice(
        access_key=access_key,
        keyword_path=keyword_path,
        wake_word_callback=wake_word_callback,
        context_path=context_path,
        inference_callback=inference_callback)

picovoice is an instance of Picovoice runtime engine that detects utterances of wake phrase defined in the file located at keyword_path. Upon detection of wake word it starts inferring user's intent from the follow-on voice command within the context defined by the file located at context_path. keyword_path is the absolute path to Porcupine wake word engine keyword file (with .ppn suffix). context_path is the absolute path to Rhino Speech-to-Intent engine context file (with .rhn suffix). wake_word_callback is invoked upon the detection of wake phrase and inference_callback is invoked upon completion of follow-on voice command inference.

When instantiated, valid sample rate can be obtained via .sample_rate. Expected number of audio samples per frame is .frame_length. The engine accepts 16-bit linearly-encoded PCM and operates on single-channel audio.

def get_next_audio_frame():
    pass

while True:
    picovoice.process(get_next_audio_frame())

When done resources have to be released explicitly

picovoice.delete()

Non-English Models

In order to detect wake words and run inference in other languages you need to use the corresponding model file. The model files for all supported languages are available here and here.

Demos

picovoicedemo provides command-line utilities for processing real-time audio (i.e. microphone) and files using Picovoice platform.

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

picovoice-3.0.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

picovoice-3.0.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file picovoice-3.0.1.tar.gz.

File metadata

  • Download URL: picovoice-3.0.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for picovoice-3.0.1.tar.gz
Algorithm Hash digest
SHA256 7eb361ff87a722858527a166b366179bed11960e111d27cd0f3be002e5bad187
MD5 173f755cd5329f72d6dd70b98064bd68
BLAKE2b-256 8f01b86ccd3baa0e2b4d7a2466a7f31c82120fd4b5375f40f5a61a76423ed2c7

See more details on using hashes here.

File details

Details for the file picovoice-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: picovoice-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for picovoice-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7583d41a5ee774c361fba38894eb7cd995d284aa299acf5d6b684ff688556344
MD5 3db4d0d342225a6e3d66258ec8b87e30
BLAKE2b-256 ea184a1f88261d1647e00796d54bdc915ed02d7129b1e44a4770c74612e1622a

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