DEV Community

Dilek Karasoy for Picovoice

Posted on

2

No Alexa, No Google: Custom Hotword Detection Arduino

Are you interested in calling your Arduino board with its own name? All you need is:

  • Arduino IDE (free)
  • Arduino Nano 33 BLE
  • Picovoice Console Account (free)

1. Train a custom hotword

  • Sign up for [Picovoice Console] for free (https://console.picovoice.ai/)
  • Go to the Porcupine Page
  • Select the language for your model
  • Type in the phrase, i.e. name you'd like to give and click on the train.
    [PS: You can read our tips for selecting a hotword.]

  • Pick Arm Cortex-M as the platform and Arduino Nano 33 BLE as the board type.

  • Paste your board UUID.

  • Open Arduino IDE

  • Download Porcupine_EN library

  • Run the GetUUID example from Porcupine_EN.

  • Check the Serial Monitor

  • Copy the UUID and paste it on Picovoice Console.

  • Click on Download.
    Congrats! You trained your hotword!

Embed the Hotword

  • Open the file pv_porcupine_params.h with a text editor. The KEYWORD_ARRAY[] contains your newly-trained model!
  • Run the PorcupineExample from the Porcupine_EN library.
  • Replace KEYWORD_ARRAY in the params.h with yours.
  • Copy your AccessKey from Picovoice Console
  • Add your AccessKey in PorcupineExample.ino. Don't forget to wrap it in " and terminate the line with ;!
  • Upload and run the example

Voila!

Looking for more examples?
Check out Picovoice Blog

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs