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-performance 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 another trained model artifact
- Documentation on model training and usage
- Optional host-side tools or scripts for visualization, data collection, or evaluation, when applicable
This repository is validated with:
- Simplicity Studio 6
- Simplicity SDK (SiSDK) v2025.12.2
- Silicon Labs AI/ML v2.2.1
There are multiple demo applications and project templates in this repository. A Dockerfile is provided for containerized builds and tests. For SiSDK 2025.12.2, project generation has been validated in Simplicity Studio. Other workflows should be revalidated on the target setup before being treated as equivalent.
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
For this repository, Simplicity Studio project generation has been validated for SiSDK 2025.12.2. If you plan to rely on the build container for project generation and firmware build, validate that workflow separately against the target SDK and tool versions first.
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.
A native command-line workflow can be used for supported applications, but the exact generation and build steps depend on the installed SDK packages, target board, and local toolchain configuration.
For this repository, Simplicity Studio project generation has been validated for SiSDK 2025.12.2. If you plan to use a CLI workflow as your primary path, validate the full generate, build, and flash sequence on your setup first.
-
To flash binaries onto your device, install:
commander(Simplicity Commander)
-
To generate and build projects natively, install:
sltslccmake- Arm GNU Embedded Toolchain (
arm-none-eabi)
-
After installing the tools, make sure they are available in your
PATH. -
Install or make available the SDK packages required by the repository:
- Simplicity SDK (SiSDK)
2025.12.2 - Silicon Labs AI/ML
2.2.1
- Simplicity SDK (SiSDK)
-
Clone this repository locally:
git clone https://github.com/SiliconLabsSoftware/machine_learning_applications.git
Note: This repository does not need to be cloned under an SDK
extension/directory when using workflows that accept explicit SDK or extension paths.
A native CLI workflow typically uses slc for project generation and CMake for firmware build. The exact commands depend on the installed SDK packages, selected target board, and local environment.
To build and run demos for your board using Simplicity Studio, you will need to:
- Add this repository as an SDK extension in Simplicity Studio
- Select a supported demo or project template for your target board
- Generate, build, and flash the project from the Studio workspace
Simplicity Studio supports adding Simplicity SDK extensions that provide project templates, prebuilt demos, and software components. To add this repository as an SDK extension:
-
Download the code, either by:
-
Cloning the repository with
git:git clone https://github.com/SiliconLabsSoftware/machine_learning_applications.git
-
Or downloading the repository archive and extracting it locally
-
-
Open Simplicity Studio
-
Open the Settings panel in Simplicity Studio
-
Select
SDKs -
Select your Simplicity SDK installation, then click
Add Extension... -
Click
Browse, select the root directory of the downloaded repository, then add and trust theMachine Learning Applicationsextension -
Click
Apply and Close
Note: Studio or VS Code schema validation may still report stale
.slceerrors, such as a missingsdkproperty or rejectingvendor. Successful project generation is the authoritative check.
Some applications in this repository include prebuilt demo binaries that can be flashed onto your device without creating a local project.
To flash a prebuilt demo:
- Open the Simplicity Studio Launcher
- Connect your device, for example an EFR32xG24 Dev Kit
- Select the connected device and click
Start - Open
Example Projects & Demos - In the left-side filters, select
Capability->Machine Learning - Locate the demo you want to try and click
Run
The available demos depend on the connected board. See demos.xml for the full list.
Some applications in this repository provide project templates that can be generated and modified in Simplicity Studio.
To generate and use one of these projects:
- Open the Simplicity Studio Launcher
- Connect your device
- Select the connected device and click
Start - Open
Example Projects & Demos - In the left-side filters, select
Capability->Machine Learning - Locate the template you want to use and click
Create - Review the project settings, then click
Finishto generate the project for your board - Build and flash the generated project from the Studio workspace
The templates shown depend on the connected board. See templates.xml for the full list of available project templates.
Regenerate the project after making changes to extension metadata or extension-provided components.
After the extension has been added, its components can be referenced by projects generated against the selected Simplicity SDK installation.
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 Silicon Labs development kits
After building the Build container image, you can configure, build, and run the tests using the scripts under tests/.
Note: Revalidate the container-based test workflow against the target SiSDK and tool versions before relying on it as the primary verification path.
To run the tests natively using command line tools, install CMake. In addition, install the prerequisites described in Command line tools: Installing the prerequisites.
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.