Skip to main content

On-device wake word detection powered by deep learning.

Project description

#Porcupine.

It supports Linux (x86_64), Mac, Raspberry Pi (Zero, 1, 2, 3, 4), and BeagleBone.

Installation

pip install pvporcupine

If it fails to install PyAudio, you can do the following for Debian/Ubuntu as referenced in the installation guide of PyAudio.

Install PyAudio

sudo apt-get install python-pyaudio python3-pyaudio

If the above fails then first run the following

sudo apt-get install portaudio19-dev
sudo apt-get install python-all-dev python3-all-dev

Usage

Realtime Demo

Make sure you have a working microphone connected to your device first. From commandline type the following

pvporcupine_mic --keywords picovoice

Then say 'picovoice'. The demo processes audio steam from microphone in realtime and detects utterances of 'picovoice'

File-Based Demo

pvporcupine_file --input_audio_file_path ${INPUT_AUDIO_FILE_PATH} --keywords bumblebee

Replace ${INPUT_AUDIO_FILE_PATH} with a valid path to an audio file (e.g. WAV or FLAC). The demo scans the file for occurrences of 'bumblebee'.

In order to get more information about using demos, run them with '--help' argument or look into their GitHub page here.

Porcupine Class

You can create an instance of Porcupine engine for use within your application using the factory method provided below

import pvporcupine

pvporcupine.create(keywords=pvporcupine.KEYWORDS)

pvporcupine.KEYWORDS is the set of default keyword files that ships with the PIP package across all platforms. In order to use your own keyword file you can instantiate the object as follows:

import pvporcupine

keyword_file_1_path = ...
keyword_file_2_path = ...
keyword_file_3_path = ...

pvporcupine.create(keyword_file_paths=[keyword_file_1_path, keyword_file_2_path, keyword_file_3_path])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pvporcupine, version 1.7.0
Filename, size File type Python version Upload date Hashes
Filename, size pvporcupine-1.7.0-py3-none-any.whl (2.4 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pvporcupine-1.7.0.tar.gz (2.4 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page