Porcupine Wake Word
Vue Quick Start
- Chrome & Chromium-based browsers
- Picovoice Account and AccessKey
- Node.js 16+
- Vue 2.6.11+, 3.0.0+
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:
porcupineModel object with either of the methods above:
Create a Vue Component that detects the built-in keywords
To learn how to use
PorcupineVue with Vue's Composition API, check Porcupine Vue GitHub Repo.
The binding will take care of microphone access and audio down-sampling (
To start audio processing:
To stop audio processing:
Clean up resources explicitly with:
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 use Porcupine with other languages, you need to use the corresponding model file (
.pv) for the desired language. The model files for all
supported languages are available on the Picovoice Github repository.
For the Porcupine Vue SDK, there is a Vue demo project available on the Porcupine GitHub repository.
Clone the Porcupine repository from GitHub:
- Install the dependencies and use the
startscript with a language code to start the demo in the language of your choice (e.g.
ko-> Korean). To see a list of available languages, run
startwithout a language code.
- Open the link provided by the command-line output to launch the demo in your browser.
- @picovoice/porcupine-vue on the npm registry
- @picovoice/porcupine-web on the npm registry
- @picovoice/web-voice-processor on the npm registry