Porcupine Wake Word
Web Quick Start
- Chrome & Chromium-based browsers
- Picovoice Account and AccessKey
- Node.js 14+
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your
Make sure to keep your
Put the model file in the project's public directory or generate a base64 model using the build in script:
PorcupineWorker instance using the model from public directory:
or using the base64 model:
Subscribe the engine to the Web Voice Processor:
Release resources explicitly when done with Porcupine:
Create custom keywords using the Picovoice Console.
Train and download a Porcupine keyword model (
.ppn) for the target platform
This model file can be used directly with
publicPath, but, if
base64 is preferable, convert the
.ppn file to a base64
Similar to the model file (
.pv), keyword files (
.ppn) are saved in IndexedDB to be used by Web Assembly.
publicPath must be set for each keyword to instantiate Porcupine.
If both are set, Porcupine will use the
label is required to identify the keyword once the detection occurs.
Then, initialize an instance of
In order to detect non-English wake words you need to use the corresponding model file (
.pv). The model files for all
supported languages are available on the Picovoice GitHub repository.
For the Porcupine Web SDK, there is a Web demo project available on the Porcupine GitHub repository.
Clone the Porcupine repository from GitHub:
- Install dependencies and run:
- Open http://localhost:5000 to view it in the browser.