On-device wake word detection powered by deep learning.
Project description
It supports Ubuntu (x86_64), Mac (x86_64), Raspberry Pi (Zero, 1, 2, 3, 4) running Raspbian, and BeagleBone.
## Installation
```bash
sudo pip3 install pvporcupine
```
If it fails to install PyAudio, you can do the following for Debian/Ubuntu as referenced in the installation guide
of [PyAudio](https://people.csail.mit.edu/hubert/pyaudio/).
Install PyAudio
```bash
sudo apt-get install python3-pyaudio
```
If the above fails then first run the following
```bash
sudo apt-get install portaudio19-dev
sudo apt-get install python3-all-dev
```
## Usage
### Realtime Demo
Make sure you have a working microphone connected to your device first. From commandline type the following
```bash
pvporcupine_mic --keywords picovoice
```
Then say 'picovoice'. The demo processes audio steam from microphone in realtime and detects utterances of 'picovoice'
### File-Based Demo
```bash
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](https://github.com/Picovoice/porcupine/tree/master/demo/python).
### Porcupine Class
You can create an instance of Porcupine engine for use within your application using the factory method provided below
```python
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:
```python
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
pvporcupine-1.8.0.tar.gz
(1.3 MB
view details)
File details
Details for the file pvporcupine-1.8.0.tar.gz
.
File metadata
- Download URL: pvporcupine-1.8.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69673841e77b2f4e236095bbf15241538b2844cbb2f9519721f8cff9884d4cb9 |
|
MD5 | fd540cc75bf83db16b5f17a2014e0a32 |
|
BLAKE2b-256 | 5220f639a8105fea2643820e8bf51d930601ef3f423bfe3dce5b59fc73fd9e21 |