Skip to main content

⚠️ DEPRECATED: This package has been deprecated and is no longer maintained.

This project has been archived.

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

Project description

⚠️ This package is deprecated and will no longer be maintained

Picovoice Demos

Made in Vancouver, Canada by Picovoice

This package contains demos and commandline utilities for processing real-time audio (i.e. microphone) and audio files using Picovoice platform.

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.8+
  • Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), and Raspberry Pi (Zero, 3, 4, 5).

Installation

sudo pip3 install picovoicedemo

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

File Demo

It allows testing Picovoice on a corpus of audio files. The demo is mainly useful for quantitative performance benchmarking. It accepts 16kHz audio files. Picovoice processes a single-channel audio stream if a stereo file is provided it only processes the first (left) channel. The following processes a file looking for instances of the wake phrase defined in the file located at ${PATH_TO_PORCUPINE_KEYWORD_FILE} and then infers the follow-on spoken command using the context defined by the file located at ${PATH_TO_RHINO_CONTEXT_FILE)}:

picovoice_demo_file \
--access_key ${ACCESS_KEY} \
--wav_path ${PATH_TO_INPUT_AUDIO_FILE} \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)}

Mic Demo

It opens an audio stream from a microphone and detects utterances of a give wake word(s). The following processes incoming audio from the microphone for instances of the wake phrase defined in the file located at ${PATH_TO_PORCUPINE_KEYWORD_FILE} and then infers the follow-on spoken command using the context defined by the file located at ${PATH_TO_RHINO_CONTEXT_FILE)}. Upon completion of the spoken command inference it resumes wake word detection.

picovoice_demo_mic \
--access_key ${ACCESS_KEY} \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)}

It is possible that the default audio input device recognized by the demo is not the one being used. There are a couple of debugging facilities baked into the demo application to solve this. First, type the following into the console:

picovoice_demo_mic --show_audio_devices

It provides information about various audio input devices on the box. On a Linux box, this is the console output

index: 0, device name: USB Audio Device
index: 1, device name: MacBook Air Microphone

You can use the device index to specify which microphone to use for the demo. For instance, if you want to use the USB Audio Device in the above example, you can invoke the demo application as below:

picovoice_demo_mic \
--access_key ${ACCESS_KEY} \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)} \
--audio_device_index 0

If the problem persists we suggest storing the recorded audio into a file for inspection. This can be achieved by

picovoice_demo_mic \
--access_key ${ACCESS_KEY} \
--keyword_path ${PATH_TO_PORCUPINE_KEYWORD_FILE} \
--context_path ${PATH_TO_RHINO_CONTEXT_FILE)} \
--audio_device_index 0 \
--output_path ~/test.wav

If after listening to stored file there is no apparent problem detected please open an issue.

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

picovoicedemo-3.0.4.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

picovoicedemo-3.0.4-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file picovoicedemo-3.0.4.tar.gz.

File metadata

  • Download URL: picovoicedemo-3.0.4.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.12

File hashes

Hashes for picovoicedemo-3.0.4.tar.gz
Algorithm Hash digest
SHA256 1446332ec8a5d25991824d9e6b683b03fbb818a1db0c6da59c0f52368beb7421
MD5 2c476dbf089f45f78fb0ab88041548c6
BLAKE2b-256 c9fdc402e8f40507901e1c4eba01ebfbdefd3bf01abe1f025e787d53426adbbc

See more details on using hashes here.

File details

Details for the file picovoicedemo-3.0.4-py3-none-any.whl.

File metadata

  • Download URL: picovoicedemo-3.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.12

File hashes

Hashes for picovoicedemo-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7b79f9fe5e2c5750a0a5f8c44c4cf27ba36efb50a5bc17389dfe45aa340fc335
MD5 f23f42dfa6a1a2e72e7ce7090b80496c
BLAKE2b-256 74afd77bfa519569df0d8f4ffb82ca4c885f47aed67a59a8642719febef820ff

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