← All projects
Project record1 mention
Originally shared on Hacker News

Live speech-to-text on an ESP32-P4 microcontroller, no cloud

Open-vocabulary English speech recognizer running live on an ESP32-P4 microcontroller with no cloud, using the chip's two RISC-V cores and PIE SIMD extension (no NPU). Quantizes Kroko (by Banafo), a 65.7M-parameter streaming Zipformer2 transducer, from 71 MB int8 to 2-4 bits (26.65 MB) and runs a custom integer engine with hand-written PIE assembly kernels; reports 4.34% WER on LibriSpeech test-clean at 0.70x real time, with hotwords, six voice-control demos, and flashing from the browser.

Last shared
01 / The problem

What it addresses

Running live open-vocabulary speech recognition entirely on-device on a microcontroller with no cloud, no network, and no NPU, fitting the model into the board's 32 MB of PSRAM via quantization.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Live speech-to-text on an ESP32-P4 microcontroller, no cloud

    Open-vocabulary English speech recognizer running live on an ESP32-P4 microcontroller with no cloud, using the chip's two RISC-V cores and PIE SIMD extension (no NPU). Quantizes Kroko (by Banafo), a 65.7M-parameter streaming Zipformer2 transducer, from 71 MB int8 to 2-4 bits (26.65 MB) and runs a custom integer engine with hand-written PIE assembly kernels; reports 4.34% WER on LibriSpeech test-clean at 0.70x real time, with hotwords, six voice-control demos, and flashing from the browser.

    Problem: Running live open-vocabulary speech recognition entirely on-device on a microcontroller with no cloud, no network, and no NPU, fitting the model into the board's 32 MB of PSRAM via quantization.

    Posted by @boumedinebillal · Original source ↗

    Story title · @boumedinebillal · · Source ↗

    Show HN: Live speech-to-text on an ESP32-P4 microcontroller, no cloud

    Submitted URL · @boumedinebillal · · Source ↗

    https://github.com/BoumedineBillal/esp32-pie-asr

    Source text · @boumedinebillal · · Source ↗

    This runs an open-vocabulary English speech recognizer live on an ESP32-P4: you speak into the board's mic and the words appear on its screen as you talk. No network, no NPU: just the chip's two RISC-V cores and their SIMD extension (PIE).

    Source text · @boumedinebillal · · Source ↗

    The model is Kroko (by Banafo), a 65.7M-parameter streaming Zipformer2 transducer. As released it is 71 MB in int8, which does not fit the board's 32 MB of PSRAM, so I quantized the weights to 2 and 4 bits (26.65 MB, groups of 128 with a Hadamard rotation, the bit width chosen per matrix) and wrote my own engine: integer arithmetic throughout, with the hot loops hand-written in PIE assembly.

    Source text · @boumedinebillal · · Source ↗

    test-clean 4.34% WER, test-other 10.26% (the original int8 model on a PC: 3.94% and 9.17%).

    Source text · @boumedinebillal · · Source ↗

    1.28 s of audio processed in 0.90 s (0.70x real time), both cores at 400 MHz.

    Source text · @boumedinebillal · · Source ↗

    There are also hotwords (phrases to listen for, from a text file on the SD card) and six voice-control demos driven by simple word rules, no LLM.

    Source text · @boumedinebillal · · Source ↗

    Limits: English only; it needs the chip revision v3 (P4X) with 32 MB PSRAM; accuracy is measured on clean read speech, noisy rooms not yet. You can flash it from the browser; the weights are on Hugging Face.

    Source text · @boumedinebillal · · Source ↗

    Video: https://www.youtube.com/watch?v=oe-2MowdsSs

    Source text · @boumedinebillal · · Source ↗

    Banafo is a small company that trained Kroko, a streaming Zipformer2 transducer, and released community models on Hugging Face: https://huggingface.co/Banafo/Kroko-ASR