Porcupine Wake Word
Arduino Quick Start
Platforms
Requirements
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your AccessKey
.
Make sure to keep your AccessKey
secret.
Quick Start
Setup
- Install and select desired board from
Tools -> Board
.- Install
Arduino Mbed OS Nano Boards
forArduino Nano 33 BLE Sense
. - Install
Arduino Mbed OS Portenta Boards
forArduino Portenta H7 (M7 core)
.
- Install
- Select the desired device
Serial Port
to upload package viaTools -> Port
. - Open the Library Manager in the Arduino IDE.
- Search for the
Porcupine_EN
package, and click on theInstall
button.
Usage
Initialize audio and construct the porcupine object in the setup function:
Get the audio frames and pass them in to pv_porcupine_process
in the loop function:
Release resources explicitly when done with Picovoice:
Custom Keywords
- Obtain the UUID of the chipset:
- Open
File -> Examples -> Porcupine_EN -> GetUUID
. - Click
Upload
and check theSerial Monitor
for the UUID of the board:
- Open
- Go to Picovoice Console to create models for Porcupine Wake Word engine.
- Select
Arm Cortex-M
as the platform when training the model. - Select appropriate board type and paste in your board UUID.
- Train your models.
- Download your custom keyword model.
- Decompress the zip file. The
.ppn
file inside is the binary model for the Porcupine Wake Word. The zip archive also contains a.h
header file containing theC
array version of the binary model. - Copy the contents of the arrays inside the
.h
header files and update thekeyword_array
:
Non-English Languages
Open the Library Manager in the Arduino IDE and search for Porcupine
. Click Install
on the language desired and add the header file to the project:
Demo
For the Porcupine Wake Word Arduino SDK, we offer demo projects for several evaluation boards to demonstrate how to use the Porcupine engine on Arduino.
Setup
- Open the Library Manager in the Arduino IDE.
- Search for the
Porcupine_EN
package, and click on theInstall
button.
Usage
- Open
File -> Examples -> Porcupine_EN -> PorcupineExcample
. - Replace
ACCESS_KEY
with the AccessKey obtained from picovoice console. - Press
Upload
and checkSerial Monitor
for outputs.
Resources
API
GitHub
- Porcupine Wake Word SDK for Arduino boards - English language
- Porcupine Wake Word SDK for Arduino boards - German language
- Porcupine Wake Word SDK for Arduino boards - Spanish language
- Porcupine Wake Word SDK for Arduino boards - French language