Package: picovoicedemo
Picovoice DemosMade in Vancouver, Canada byPicovoiceThis package contains demos and commandline utilities for processing real-time audio (i.e. microphone) and audio files
using Picovoice platform.PicovoicePicovoice 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 isPrivate: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.CompatibilityPython 3.7+Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (all variants), NVIDIA Jetson (Nano), and BeagleBone.Installationsudo pip3 install picovoicedemoAccessKeyPicovoice requires a valid PicovoiceAccessKeyat initialization.AccessKeyacts as your credentials when using Picovoice SDKs.
You can get yourAccessKeyfor free. Make sure to keep yourAccessKeysecret.
Signup or Login toPicovoice Consoleto get yourAccessKey.UsageFile DemoIt 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 DemoIt 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_devicesIt provides information about various audio input devices on the box. On a Linux box, this is the console outputindex: 0, device name: USB Audio Device
index: 1, device name: MacBook Air MicrophoneYou 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 0If the problem persists we suggest storing the recorded audio into a file for inspection. This can be achieved bypicovoice_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.wavIf after listening to stored file there is no apparent problem detected please open an issue.