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 Python SDK

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 on-device. Picovoice is

  • Private: Everything is processed on-device. Intrinsically HIPAA and GDPR compliant.
  • Reliable: Runs without relying on connectivity or external service availability.
  • Responsive: Edge-first architecture eliminates unpredictable network delay.
  • Highly-Accurate: Resilient to noise and reverberation. Outperforms cloud-based solutions with high margins.
  • Cross-Platform: Build on your platforms of choice, with tools your team is accustomed to.
  • Cost-Effective: Avoid unbounded cloud fees by processing locally with minimal resources.

Compatibility

  • Python 3
  • Runs on Linux (x86_64), Mac (x86_64), Windows (x86_64), Raspberry Pi (all variants), and BeagleBone.

Installation

pip3 install picovoice

Usage

Create a new instance of Picovoice platform as below. 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 called upon completion of follow-on voice command inference.

from picovoice import Picovoice

keyword_path = ...

def wake_word_callback():
    pass

context_path = ...

def inference_callback(is_understood, intent, slot_values):
    pass

pv = Picovoice(
        keyword_path=keyword_path,
        wake_word_callback=wake_word_callback,
        context_path=context_path,
        inference_callback=inference_callback)

When instantiated, valid sample rate can be obtained via pv.sample_rate. Expected number of audio samples per frame is pv.frame_length. The incoming audio can be processed as below

def get_next_audio_frame():
    pass

while True:
    pv.process()

Finally, when done be sure to explicitly release the resources.

pv.delete()

References

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-0.8.4.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

picovoice-0.8.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: picovoice-0.8.4.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.9

File hashes

Hashes for picovoice-0.8.4.tar.gz
Algorithm Hash digest
SHA256 cfbb3d2d34b3c1209ead01883921a47c28045a043a345f9e5c834e4fdfb80e94
MD5 13ef98d5dc7d3bc600ede9c3df7c989f
BLAKE2b-256 897662e54154241034b95419d28bdea677d2d5d51187714db6b9be70114b4f51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: picovoice-0.8.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.6.9

File hashes

Hashes for picovoice-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0492fd4f6f5f9654ca787c4c162b0e1118e3c703f9b94288d7e19f833fef8615
MD5 99ee5d2dcfd5b70fe78d757acadad04e
BLAKE2b-256 07d77ebc313c199c2ecb1bec8840ae85dba394ec3d50ff52390b1eab16d99dc6

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