Silicon Labs provides integrated hardware, software and development tools to help you quickly create secure, intelligent devices suitable for both industrial and commercial use cases. Our development platform has first class support for embedded machine learning (TinyML) model inference, backed by the Tensorflow Lite for Microcontrollers (TFLM) framework. We offer devices such as the EFR32xG24 dev kit that have hardware accelerators specifically built for high-performant and energy efficient AI/ML edge computing.
This repository contains a collection of embedded applications that leverage ML. You can use these to program your own Silicon Labs device, or as a starting point to develop your own TinyML application.
Feel free to open an issue if you have any questions or encounter problems, but take note that unless otherwise stated, all examples are considered to be EXPERIMENTAL QUALITY. The provided code has not been formally tested and is provided as-is. It is not suitable for production environments. In addition, there may be no bug maintenance planned for these resources. Silicon Labs may update the repository from time to time.
- Silicon Labs Machine Learning Applications
The repository is organized by use case category. All applications are self contained, and include their own documentation.
Within an application's directory you will generally find,
- Source code for training the ML model and exporting it to Tensorflow Lite or a trained model artifact
- Documentation on model training and usage
- Simplicity SDK Suite v2025.6.2
- Silicon Labs AI/ML v2.1.2
There are multiple demo applications and project templates in this repository. We provide a Dockerfile which defines a build container for building and testing the code. Instructions for building natively using command line tools or Simplicity Studio are located further down.
The Dockerfile at build/Dockerfile provides tooling for running containerized application builds and tests.
To build and run an application for your board using the build container, you will need to:
- Install the prerequisites
- Use the build container to generate a project for your board using Silicon Labs Configurator and compile it using Make
- Copy the compiled application binaries to your host machine
- Use Simplicity Commander on your host machine to flash the compiled application onto your device
To install the prerequisites and build the build container image,
- 
To compile the code you'll need a Docker-compatible CLI, e.g. Docker or Rancher (with the dockerdengine).
- 
To flash binaries onto your device, you'll need commander(Simplicity Commander)
- 
After installing the tools, make sure that they are available in your PATH.
- 
Then, clone this repository. git clone https://github.com/SiliconLabs/machine_learning_applications 
- 
Lastly, build the container image using docker.# Navigate to the repository cd machine_learning_applications # Build the container image docker build -t mla-builder -f build/Dockerfile . If on aarch64, use the following command instead:DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t mla-builder -f build Dockerfile .
You can use the build container to generate and compile a project based on project templates provided by this repository. The example below demonstrates this for the sensory_wakeupword_series_2 application, but a similar procedure can be used for other applications.
- 
On your host machine, run the build container and bind a local directory to a directory on the container # Start bash in the build container, with /tmp bound to your host machine's Downloads folder docker run -v $HOME/downloads:/tmp -it mla-builder bash 
- 
In the build container, generate an application for a specific Silicon Labs device and compile it. # Navigate to the application you want to build cd application/voice/sensory_wakeupword/app # Generate the application for the EFR32xG24 DevKit - BRD2601B slc generate sensory_wakeupword_series_2.slcp --with brd2601b -d target/brd2601b # Compile the application cd target/brd2601b make -f sensory_wakeupword_series_2.Makefile -j 
- 
In the build container, copy the compiled application binaries to your host machine # Copy application binaries to the host machine Downloads folder cp -r build /tmp/sensory_wakeupword
- 
On your host machine, use commanderto flash the application binaries onto your device,# Assuming you've connected a EFR32xG24 Dev Kit to your machine over USB, commander flash ~/Downloads/sensory_wakeupword/debug/sensory_wakeupword_series_2.s37 # Note: If you encounter issues when flashing, try running `commander device recover` first. 
To build and run an application for your board using the command line tools, you will need to:
- Install the prerequisites
- Generate a project for your board using Silicon Labs Configurator
- Build the project using Make and flash it onto your device using Simplicity Commander
- 
To flash binaries onto your device, you'll need - commander(Simplicity Commander)
 
- 
To generate and build the project, you'll need - make(for Windows we recommend using WSL or Cygwin)
- arm-eabi-noneGNU toolchain (GNU ARM Embedded Toolchain, version 12.2.Rel1)
- slc(Silicon Labs Configurator, installation instructions can be found under Section 2 in the provided link)
 
- 
After installing the tools, make sure that they are available in your PATH.
- 
Then, download Simplicity Sdk >= v2025.6.2andAI/MLrepo >= v2.1.2. You can obtain this from the Github repository SiliconLabs/simplicity_sdk and SiliconLabsSoftware/aiml-extension.git clone https://github.com/SiliconLabs/simplicity_sdk.git cd simplicity_sdk git checkout v2025.6.2 mkdir extension cd extension git clone https://github.com/SiliconLabsSoftware/aiml-extension.git cd aiml-extension git checkout v2.1.2 
- 
Next, clone this repository into extension folder created inside simplicity sdk. git clone https://github.com/SiliconLabs/machine_learning_applications 
- 
After this, configure slcto use and trust the Simplicity SDK, AI/ML Extension and Machine Learning Applications Extension and ARM GNU Embedded Toolchain you downloaded,slc configuration --sdk=<path/to/simplicity_sdk> slc configuration --gcc-toolchain=<path/to/arm-gnu-gcc-toolchain> slc signature trust --sdk=<path/to/simplicity_sdk> slc signature trust --extension-path <path/to/simplicity_sdk>/extension/aiml-extension slc signature trust --extension-path <path/to/simplicity_sdk>/extension/machine_learning_applications 
You can use the CLI tools to generate and compile a project based on project templates provided by this repository as follows. The example below demonstrates this for the sensory_wakeupword_series_2 application, but a similar procedure can be used for other applications.
- 
Generate a project targeting your device, # Navigate to the application cd application/voice/sensory_wakeupword # Then generate a project from the template slc generate app/sensory_wakeupword_series_2.slcp --with brd2601b -d target/brd2601b 
- 
Build the project using make,# Starting from voice/sensory_wakeupword cd target/brd2601b make -f sensory_wakeupword_series_2.Makefile -j 
- 
The compiled code can then be found under target/brd2601b/build/debug. You can flash the firmware onto your device withcommanderusing the following command,# Starting from voice/sensory_wakeupword # Assuming you've connected a EFR32xG24 Dev Kit to your machine over USB, commander flash bin/efr32xg24_dev_kit/sensory_wakeupword_series_2.s37 # Note: If you encounter issues when flashing, try running `commander device recover` first. 
To build and run demos for your board using Simplicity Studio, you will need to:
- Add this Git repository as a Gecko SDK extension in Simplicity Studio
- Create a new project for your board using the Simplicity Studio Launcher
- Build the code and flash it onto your device using the Simplicity Studio IDE
Simplicity Studio supports adding Gecko SDK extensions which provide new project templates, prebuilt demos and software components. To add this repository as an SDK extension,
- Download the code, either by
- 
Cloning the repository using git:git clone https://github.com/SiliconLabs/machine_learning_applications.git 
- 
Or navigating to https://github.com/SiliconLabs/machine_learning_applications.git, opening the green Codedropdown, selectingDownload ZIP, and extracting the contents.
 
- 
- Open Simplicity Studio
- Open the Preferences view in Simplicity Studio (the cogwheel at the top of the window)
- Select Simplicity Studio→SDKs
- Select your Gecko SDK Suite, then click on Add Extension....
- In the menu, click on Browseand point to the root directory of the downloaded repository. SelectMachine Learning Applicationsand click onOKto add the extension, then click onTrustto trust the contents.
- Click Apply and Closeto exit the preferences menu.
Note: If Simplicity Studio→SDKs doesn't show up, you might be missing the 32-bit and Wireless MCUs package for Studio. You can install this by opening the Install view (the arrow at the top of the window) and selecting Install by technology type.
Some applications in this repository include prebuilt demo binaries which can be flashed onto your device without setting up a local project. To flash the prebuilt demo onto your device,
- Open the Simplicity Studio Launcher (the rocket button in the top right corner of the window)
- Connect your device (e.g. an EFR32xG24 Dev Kit)
- Choose your device in the Connected Devices dropdown, and click on Start
- Navigate to Example Projects & Demos. Then, in the context menu on the left, scroll down toCapability, and selectMachine Learning.
- Locate the demo you want to try out and click on Run. Note that the listed demos will depend on what board you've connected. The demos.xml file in this repo lists all available demos.
Some applications in this repository include project templates which can be used to generate projects you can modify and try out. You can generate a new project based on project templates provided by this repository as follows:
- Open the Simplicity Studio Launcher (the rocket button in the top right corner of the window)
- Connect your device (e.g. an EFR32xG24 Dev Kit)
- Choose your device in the Connected Devices dropdown, and click on Start
- Navigate to Example Projects & Demos. Then, in the context menu on the left, scroll down toCapability, and selectMachine Learning.
- Locate the template you want to try out and click on Create. You can typically leave the settings to their defaults, and click onFinishto set up the project for your board. Note that the listed templates will depend on what board you've connected. The templates.xml file in this repo lists all available project templates.
- Inside your project, you can then compile and run the code from the window context menu:
- Click on Project→Build Projectto compile the code
- Click on Run→Debugand select your connected device to flash the compiled firmware onto your device
 
- Click on 
You need to perform this step every time you make changes to the extension.
Now you can reference the components in this extension, in projects that are generated using the above Gecko SDK.
You can find scripts for testing the repository under tests/. These are CMake-based. The tests can be run through the provided build container or natively.
The scripts define two kinds of tests:
- Unit tests: Standard unit testing using GoogleTest
- Application builds: Verifies that the bundled applications compile when targeting specific Silabs development kits
After building the #Build container image, you can configure, build and run the tests by running
docker run mla-builder tests/run.sh /opt/gecko_sdkTo run the tests natively using command line tools you need to install CMake. In addition, you'll need the prerequisites described in #Command line tools: Installing the prerequites.
You can configure, build and run the tests by running
# Configure build scripts
cmake -S tests -B tests/build
# Compile applications and test binaries
cmake --build tests/build
# Run tests
ctest --test-dir tests/buildCertain files and directories have specific licensing terms which are clearly marked. Aside from that, content in this repository is generally available under the Zlib license. See LICENSE for more details.