mcuPicovoice Shepherd - STM32F411E-DISCO

The STM32F411EDISCOVERY Discovery kit is a development board featuring an Arm Cortex-M4 microcontroller. It comes with 512KB of on-chip flash memory and 128KB of RAM. The Cortex-M4 core operates at up to 100 MHz.

stm32f411 discovery board overview

Picovoice Shepherd is the first no-code platform for building voice interfaces on microcontrollers. It enables creating voice experiences similar to Alexa that run entirely on microcontrollers. Picovoice Shepherd accelerates prototyping, mitigates technical risks, and shortens time to market. Paired with Picovoice Console users can deploy custom voice models into microcontrollers instantly.


  • Linux (x86_64)
  • macOS (x86_64, arm64)
  • Windows (x86_64)


Picovoice Account & AccessKey

Signup or Login to Picovoice Console to get your AccessKey. Make sure to keep your AccessKey secret.


  1. Install Python 3.

    • macOS: Install Python 3 through Homebrew.
    • Windows: Refer to this link to add Python to PATH environmental variable.
  2. Install the pvshepherd Python package using PIP:

pip3 install pvshepherd
  1. Install tkinter:
  • For Debian based Linux distribution:
sudo apt-get install python3-tk
  • For Linux distribution with yum installer:
sudo yum install tkinter
  • For macOS:
brew install [email protected]{$PYTHON_VERSION}
  • For Windows:
    • tkinter is installed by default.


Run the following command from the terminal:


Upload the Picovoice Firmware

Two USB cables are required to connect the board to the PC, a Mini-USB Type-B and a Micro-USB Type-B. The former is used to program and power the board, while the latter is used to send information to the computer; both are shown in the figure below:

stm32f411 from top

Select STM32F411E-DISCO and the language of your choice on the first page.

Selecting your board and press the upload button at the bottom right corner of the window

Press the Upload Firmware button and wait for the operation to complete.

Upload The Default Models

Get an AccessKey and paste it to the AccessKey field. The unique universal identifier (UUID) of Microcontroller on the board is at the top. You need this UUID to create custom models using Picovoice Console. For now, let's continue with the default models. Upload the default voice models to the board by pressing Use Default Models.

Selecting your models and press the upload button at the bottom right corner of the window

Test the Default Models

The board is ready. It has started processing the audio input from the microphone in real-time. It writes to the Shepherd console when the Picovoice engine detects utterances of the given wake word and follow-on voice commands. Say:

Picovoice, set the living room lights purple

Picovoice will detect the occurrence of the default wake word ("Picovoice"), and then determines the intent from the follow-on spoken command:

"is_understood" : "true",
"intent": "changeColor",
"slots": {
"location" : "living room",
"color" : "purple"

The Show Context button opens a new window and lists all the available voice commands.

Monitoring the board activities and changing its parameters

The volume and CPU usage are on the top left. The inference sensitivity of the engines can be changed on the fly. The sensitivity parameter controls the tradeoff between the miss rate and false alarm. A higher sensitivity reduces the miss rate (false reject rate) at the cost of increased false alarm rate.

Audio Debugging

You can record and save the audio fed to the Picovoice from Shepherd. Go to the Audio debugging tab and click on the Record Audio button.

Saving audio recorded by the board for debugging

Create Custom Models

  1. Go back to the Upload Model page and copy the UUID to the clipboard using the Copy button.
  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.
  4. Select STM32 as the board type and provide the UUID of the chipset on the board.
create custom wake-word for the board

Upload the Custom Models

  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 Speech-to-Intent.
  3. Go to the Upload Model page and select the models.
  4. Press the Upload button.
upload the custom models to the board

Demo Project

Additionally, there is a demo project on the Picovoice GitHub repository for the STM32F411 discovery board to ease integrating the designed voice interface into projects.

Issue with this doc? Please let us know.