arduinoPicovoice Platform — Arduino Quick Start

  • End-to-End Voice Platform
  • Offline Voice Recognition
  • Local Speech Recognition
  • Speech-to-Intent
  • Domain-Specific NLU
  • Wake Word Detection
  • Arduino
  • C

Requirements

Compatibility

Setup

To Install the Picovoice Arduino library, open the Library Manager in the Arduino IDE, search for the Picovoice package, and click on the Install button.

Install Picovoice package using Arduino IDE

Example

The Picovoice package includes an example. It can be opened via File -> Examples -> Picovoice_EN -> PicovoiceExample.

Usage

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"

or

"Picovoice, set the lights in the bedroom to blue"

The full context is printed in the serial monitor as well for reference.

Picovoice example in Serial Monitor

To get more detailed information on Picovoice APIs, please refer to the Microcontroller API doc.

Create Custom Wake Words & Contexts

  1. Compile and upload the Picovoice_EN/GetUUID sketch from the File -> Examples menu. Copy the UUID of the board printed at the beginning of the session to the serial monitor.
  2. Go to Picovoice Console to create models for Porcupine wake word engine and Rhino Speech-to-Intent engine.
  3. Select Arm Cortex M as the platform when training the model, and Arduino Nano 33 BLE as the board type and provide the UUID of the chipset on the board. Picovoice example in Serial Monitor
  4. 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

  1. Download your custom voice model(s) from Picovoice Console.
  2. Decompress the zip file. The model file is either .ppn for Porcupine wake word or .rhn for Rhino context.
  3. 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
  4. Copy the content of output_c_array.txt and update the KEYWORD_ARRAY and CONTEXT_ARRAY values in params.h.

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.


Issue with this doc? Please let us know.