Downloads · 30 days
0
beleata74/SaraNet-KWS-17-Pico-RP2040
SaraNet-KWS-17-Pico-RP2040 is a machine learning model from beleata74. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
SaraNet is a revolutionary, highly-optimized Neural Network running directly on a Raspberry Pi Pico (RP2040) designed specifically for 16-word Keyword Spotting (KWS).
Downloads · 30 days
0
Access
Public
Updated Jul 18, 2026
Repo size
744 KB
Likes
1
Public
Click a slice to open those files.
.h1.3 MB · 62%
From the Hugging Face model README
SaraNet is a revolutionary, highly-optimized Neural Network running directly on a Raspberry Pi Pico (RP2040) designed specifically for 16-word Keyword Spotting (KWS).
What makes SaraNet unique is its Activation-Free Architecture known as the "Mirror-Neuron" Topology, entirely bypassing classical activation functions (like ReLU or GELU). Instead, non-linearity is achieved through strict signal routing and physical hardware-like gating.
Inspired by hardware electronics and signal routing, SaraNet operates on the following principles:
clamp(min=0.0). They only allow positive signals to enter.clamp(max=0.0). They only allow negative signals to enter.This architecture has been mathematically proven to solve non-linear problems (like XOR) while avoiding classical complex activation functions, making it perfect for hyper-fast INT8 quantization on microcontrollers.
The RP2040 lacks a hardware FPU (Floating-Point Unit), making standard Audio FFT operations extremely slow (taking ~3.8 seconds with soft-float emulation).
To achieve Real-Time Execution (< 1 second latency), we developed a custom C++ Audio Frontend:
int64_t) accumulation engine with scaled lookup tables, reducing execution time by 5x!The system captures 1 second of raw 16-bit PCM audio (16 kHz) and runs the entire pipeline on the Pico.
Because the total execution time (0.84s) is less than the duration of the audio itself (1.0s), SaraNet runs officially in Real-Time, leaving enough CPU headroom to capture the next continuous second of audio without dropping frames!
Tested against real-world 16-bit PCM audio samples, SaraNet achieves ~89.9% accuracy. It successfully recognizes command words like "stop", "left", "off", and "marvin", while correctly rejecting Out-Of-Vocabulary (OOV) words (e.g. "learn", "bird", "house") by classifying them as UNKNOWN/NOISE.
SaraNet_Pico/ - The Arduino IDE sketch containing the Dual-Core C++ code, optimized Neural Net, and Audio Frontend.export_audio_frontend.py - Script used to extract and quantize the PyTorch Audio properties into C++ headers.pico_raw_audio_test.py - USB Serial test script that streams raw .wav files from your PC to the Pico to benchmark accuracy and speed.Developed by Nasko & Sara (July 2026).