On-device wake word detection powered by deep learning.
Project description
It supports Linux (x86_64), Mac, Raspberry Pi (Zero, 1, 2, 3), 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 alexa
Then say 'alexa'. The demo processes audio steam from microphone in realtime and detects utterances of 'alexa'
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 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 as 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pvporcupine-1.6.0.tar.gz
.
File metadata
- Download URL: pvporcupine-1.6.0.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3be9622e2718362a04ad3d7099336d9bcc3a30a9bd17c4171248e093826b0009 |
|
MD5 | 7814e6ad05d129508157e0fef40ed8c1 |
|
BLAKE2b-256 | a95badadf996a6825e74dcfaee5db3608125af1361deb30849b53066c2d72623 |
File details
Details for the file pvporcupine-1.6.0-py3-none-any.whl
.
File metadata
- Download URL: pvporcupine-1.6.0-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c97cbee6f945040dc5d20856f2e3f09043d3293800244b5995e58168ea2b59c |
|
MD5 | 88d48ef4253f200031ebe86b674c8d9e |
|
BLAKE2b-256 | bd10e0956a63e61a889c9cc35699c0a32ead9de1291f90032c929dcbf17604af |