mcuPorcupine Wake Word Engine - Microcontroller Quick Start

  • Wake Word Detection
  • Local Voice Commands
  • Offline Keyword Spotting
  • Always Listening
  • Voice Activation
  • Hotword Detection
  • Cortex-M
  • C

Cloning the Porcupine Repository

If using SSH, clone the Porcupine repository with:

git clone --recurse-submodules [email protected]:Picovoice/porcupine.git

If using HTTPS, then type:

git clone --recurse-submodules https://github.com/Picovoice/porcupine.git

Running the Porcupine Microcontroller Demos

For the single wake word demo, the default wake word is Porcupine; and for the multiple wake words demo Porcupine, Picovoice, Bumblebee, and Alexa are considered as the keywords.

STM32F407G-DISC1 (Arm Cortex-M4)

The demo project can be found on GitHub in STM32F407G-DISC1 folder.

Installation

  1. Download and install STM32CubeIDE, which is an all-in-one multi-OS development tool for STM32 microcontrollers.
  2. Follow the steps mentioned in readme for STM32Cube middleware for audio PDM to PCM conversion.

Usage

In order to compile and run the demo project on a STM32F407 discovery board, perform the following steps:

  1. Open STM32CubeIDE
  2. Click File > Open Projects from file system... to display the Import Projects dialog box. Select the stm32f407g-disc1 folder from this repository, and then press the Finish button.
  3. Copy the Inc and Lib folders from the downloaded PCM2PDM library to /Middlewares/ST/STM32_Audio/Addons/PDM
  4. Click Project > Build All
  5. Connect the board to the computer and press Run > Debug.

    printf() uses the SWO connector and the trace port 0. For more information, refer to STM32 microcontroller debug toolbox, Chapter 7.

STM32F411E-DISCO (Arm Cortex-M4)

The demo project can be found on GitHub in STM32F411E-DISCO folder.

Installation

  1. Download and install STM32CubeIDE, which is an all-in-one multi-OS development tool for STM32 microcontrollers.
  2. Follow the steps mentioned in readme for STM32Cube middleware for audio PDM to PCM conversion.

Usage

In order to compile and run the demo project on a STM32F411 discovery board, perform the following steps:

  1. Open STM32CubeIDE
  2. Click File > Open Projects from file system... to display the Import Projects dialog box. Select the stm32f411e-disco folder from this repository, and then press the Finish button.
  3. Copy the Inc and Lib folders from the downloaded PCM2PDM library to /Middlewares/ST/STM32_Audio/Addons/PDM
  4. Click Project > Build All
  5. Connect the board to the computer and press Run > Debug.

    printf() uses the SWO connector and the trace port 0. For more information, refer to STM32 microcontroller debug toolbox, Chapter 7.

STM32F469I-DISCO (Arm Cortex-M4)

The demo project can be found on GitHub in STM32F469I-DISCO folder.

Installation

  1. Download and install STM32CubeIDE, which is an all-in-one multi-OS development tool for STM32 microcontrollers.
  2. Download STM32Cube middleware for audio PDM to PCM conversion and copy it to the project folder. A more detailed guide can be found on STM32CubeF4's GitHub repository.
  3. Install a serial port monitor on your system to be able to communicate with the board. Arduino environment's built-in serial monitor and Coolterm are two free options available on all platforms (Windows, Linux, and macOS).

Usage

In order to compile and run the demo project on a STM32F469 discovery board, perform the following steps:

  1. Open STM32CubeIDE
  2. Click File > Open Projects from file system... to display the Import Projects dialog box. Select the stm32f469i-disco folder from this repository, and then press the Finish button.
  3. Copy the Inc and Lib folders from the downloaded PCM2PDM library to /Middlewares/ST/STM32_Audio/Addons/PDM
  4. Click Project > Build All
  5. Connect the board to the computer and press Run > Run

STM32F769I-DISCO (Arm Cortex-M7)

The demo project can be found on GitHub in STM32F769I-DISCO folder.

Installation

  1. Download and install STM32CubeIDE, which is an all-in-one multi-OS development tool for STM32 microcontrollers.
  2. Install a serial port monitor on your system to be able to communicate with the board. Arduino environment's built-in serial monitor and Coolterm are two free options available on all platforms (Windows, Linux, and macOS).

Usage

In order to compile and run the demo project on a STM32F769 discovery board, perform the following steps:

  1. Open STM32CubeIDE
  2. Click File > Open Projects from file system... to display the Import Projects dialog box. Select the stm32f769i-disco folder from this repository, and then press the Finish button.
  3. Click Project > Build All
  4. Connect the board to the computer and press Run > Run

STM32H747I-DISCO (Arm Cortex-M7)

The demo project can be found on GitHub in STM32H747I-DISCO folder.

Installation

  1. Download and install STM32CubeIDE, which is an all-in-one multi-OS development tool for STM32 microcontrollers.
  2. Download STM32Cube middleware for audio PDM to PCM conversion and copy it to the project folder. A more detailed guide can be found on STM32CubeH7's GitHub repository.
  3. Install a serial port monitor on your system to be able to communicate with the board. Arduino environment's built-in serial monitor and Coolterm are two free options available on all platforms (Windows, Linux, and macOS).

Usage

In order to compile and run the demo project on a STM32H747 discovery board, perform the following steps:

  1. Open STM32CubeIDE
  2. Click File > Open Projects from file system... to display the Import Projects dialog box. Select the stm32h747i-disco folder from this repository, and then press the Finish button.
  3. Copy the Inc and Lib folders from the downloaded PCM2PDM library to /CM7/Middlewares/ST/STM32_Audio/Addons/PDM
  4. Select the stm32h747i-disco-demo_CM7 inner project inside the Project Explorer window
  5. Click Project > Build All
  6. Connect the board to the computer and press Run > Run

IMXRT1050-EVKB (Arm Cortex-M7)

The demo project can be found on GitHub in iMXRT1050-EVKB folder.

Installation

For this demo, you need to download and install MCUXpresso IDE, which is an all-in-one multi-OS development tool for NXP MCUs based on Arm Cortex-M cores.

Usage

In order to compile and run the demo project on a i.MX RT1050 Evaluation board, perform the following steps:

  1. Open MCUXpresso IDE
  2. From the main toolbar, select Install MCUXpresso SDKs and install evkbimxrt1050 SDK
  3. Click File > Open Projects from file system... to display the Import Projects dialog box. Select the imxrt1050-evkb folder from this repository, and then press the Finish button.
  4. Click Project > Build All
  5. Connect the board to the computer, select the imported project inside Project Explorer window
  6. Click Run > Debug as > MCUXpresso IDE LinkServer probes and then select the connected board.
  7. In the debug view, press Run > Resume

Create Custom Wake Words & Contexts

You can create custom Porcupine wake word and Rhino context models using Picovoice Console.


Issue with this doc? Please let us know.