Learn how to train and deploy voice recognition models into Arduino Nano 33 BLE with Picovoice Porcupine Wake Word Engine. This tutorial will take less than 10 minutes from the start to a working demo! Things you need:
- Arduino IDE (free)
- Arduino Nano 33 BLE
- Picovoice Console Account (free)
Porcupine enables developers to train production-quality voice models within seconds. It runs on anything, including Arduino Nano 33 BLE
and Arduino Portenta H7
. Porcupine also supports STM32
, NXP i.MX RT
, Raspberry Pi
, BeagleBone
, NVIDIA Jetson
, Android
, iOS
, web browsers
, Linux
, macOS
, and Windows
!
Let's get started 🚀
Train
- Sign up for Picovoice Console.
- Go to the
Porcupine Page
- Select the language for your model
- Type in the phrase you want to build the model for
- Optionally, you can try it within the browser
- Once you are happy, click on the train button.
- Pick
Arm Cortex-M
as the platform - Select
Arduino Nano 33 BLE
as your board type. - You need to find the
UUID
for your board. Open Arduino IDE, and downloadPorcupine_EN
library. Run theGetUUID
example fromPorcupine_EN
. Check theSerial Monitor
to find the UUID of your board. Copy it and paste it in the relevant section.
- Click on the Download button. You should have a
.zip
file in your download folder now.
- Unzip it. Open the file
pv_porcupine_params.h
with a text editor. TheKEYWORD_ARRAY[]
contains your newly-trained model!
Deploy
- Run the
PorcupineExample
example from thePorcupine_EN
library. - Change the content of
KEYWORD_ARRAY
in theparams.h
file with the content of your downloaded model. - Go to Picovoice Console's dashboard. Copy your
AccessKey
.
- Put your
AccessKey
inPorcupineExample.ino.
Don't forget to wrap it in"
and terminate the line with;
!
- Upload and run the example. Check the
Serial Monitor
for log messages every time you say the wake phrase 🤓
Multiple keywords
You can train and deploy several models with Porcupine and recognize them concurrently. The increase in CPU and RAM usage is negligible.
Natural Language Understanding
Porcupine enables you to train always-listening voice commands. But what if you want to understand complex voice commands with multiple slots and entities? For example:
The good news is that you can also use Rhino Speech-to-Intent to accomplish this.
Start Building