Picovoice Shepherd - STM32F407G-DISC1
The STM32F4DISCOVERY Discovery kit is a development board featuring an Arm Cortex-M4 microcontroller. It comes with 1MB of on-chip flash memory and 192KB of RAM. The Cortex-M4 core operates at up to 160 MHz.
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 and AccessKey
- Python 3
- STM32F4DISCOVERY kit
Picovoice Account & AccessKey
Signup or Login to Picovoice Console to get your
Make sure to keep your
Install Python 3 .
Install the pvshepherd Python package using PIP:
- For Windows, you also need to install the driver software for the STM32 boards. Download
the ST-LINK/V2 driver and follow the instructions in
- Install tkinter :
- For Debian based Linux distribution:
- For Linux distribution with yum installer:
- For macOS:
- For Windows:
tkinteris 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:
STM32F407G-DISCO and the language of your choice on the first page.
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.
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:
Show Context button opens a new window and lists all the available voice commands.
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.
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.
Create Custom Models
- Go back to the
Upload Modelpage and copy the UUID to the clipboard using the
- 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.
STM32as the board type and provide the UUID of the chipset on the board.
Upload the Custom Models
- 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 Speech-to-Intent.
- Go to the
Upload Modelpage and select the models.
- Press the
Additionally, there is a demo project on the Picovoice GitHub repository for the STM32F407 discovery board to ease integrating the designed voice interface into projects.