Picovoice Platform — Arduino Quick Start
To Install the Picovoice Arduino library, open the Library Manager in the Arduino IDE, search for the
Picovoice package, and click on the
The Picovoice package includes an example. It can be opened via
File -> Examples -> Picovoice_EN -> PicovoiceExample.
For this example, the default wake word is
Picovoice and the context is
Smart Lighting. After uploading the sketch to the board, the engine can recognize commands such as:
"Picovoice, turn off the lights"
"Picovoice, set the lights in the bedroom to blue"
The full context is printed in the serial monitor as well for reference.
To get more detailed information on Picovoice APIs, please refer to the Microcontroller API doc.
Create Custom Wake Words & Contexts
- Compile and upload the
Picovoice_EN/GetUUIDsketch from the
File -> Examplesmenu. Copy the UUID of the board printed at the beginning of the session to the serial monitor.
- Go to Picovoice Console to create models for Porcupine wake word engine and Rhino Speech-to-Intent engine.
Arm Cortex Mas the platform when training the model, and
Arduino Nano 33 BLEas the board type and provide the UUID of the chipset on the board.
- Click the train button. The model is now being trained. You will be able to download it within a few hours for Porcupine. For Rhino, the model is available instantly.
Import Custom Wake Words & Contexts
- Download your custom voice model(s) from Picovoice Console.
- Decompress the zip file. The model file is either
.ppnfor Porcupine wake word or
.rhnfor Rhino context.
- Use binary_to_c_array.py to convert your binary models to C array format utilizing the following command:
python3 binary_to_c_array.py --binary_file_path input_binary_model --array_file_path output_c_array.txt
- Copy the content of
output_c_array.txtand update the
Picovoice is built by developers for developers. Your feedback is an essential part of the process. If you have any technical feedback and want to report a bug, you can create a GitHub issue.