logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·01.11.26
← Back to news

Speech Recognition and TTS in less than 500kb

Original article
github.com|522 points|77 comments|by petewarden|Jul 14, 2026

Moonshine Micro: Compact Voice Interfaces for Embedded Systems

Moonshine Voice is an open-source AI framework designed for developers creating real-time voice-driven applications and agents. Its specialized variant, moonshine/micro, is engineered specifically for Digital Signal Processors (DSPs) and microcontrollers.

The project utilizes the Raspberry Pi RP2350 as its primary reference platform—a chip that is remarkably affordable, retailing for approximately 80 cents.

Core Capabilities

Moonshine Micro integrates three primary voice functions into a tiny footprint, capable of operating in as little as 470 KB470\text{ KB}470 KB of RAM:

  • VAD: Voice-Activity Detection.
  • Command Recognition: Speech-to-Text (STT).
  • Neural Speech Synthesis: Text-to-Speech (TTS).

Demo Thumbnail

System Workflow

The following diagram illustrates the sequential processing pipeline used in the demo:


Resource Budget & Performance

The system is optimized for extreme resource constraints. The following data represents the requirements for the RP2350 demo:

ComponentFlash MemorySRAM (Peak Arena)Compute Load
VAD≈89 KiB\approx 89\text{ KiB}≈89 KiB≈36 KiB\approx 36\text{ KiB}≈36 KiB≈0.8 MMAC/frame\approx 0.8\text{ MMAC/frame}≈0.8 MMAC/frame (≈25 MMAC/s\approx 25\text{ MMAC/s}≈25 MMAC/s)
STT (SpellingCNN)≈1.3 MiB\approx 1.3\text{ MiB}≈1.3 MiB≈346 KiB\approx 346\text{ KiB}≈346 KiB≈36 MMAC/s\approx 36\text{ MMAC/s}≈36 MMAC/s
TTS (Neural Diphone)≈1.8 MiB\approx 1.8\text{ MiB}≈1.8 MiB≈340 KiB\approx 340\text{ KiB}≈340 KiB≈37 MMAC typical\approx 37\text{ MMAC typical}≈37 MMAC typical (≈65 MMAC/s out\approx 65\text{ MMAC/s out}≈65 MMAC/s out)
Total Pipeline≈3.6 MiB\approx 3.6\text{ MiB}≈3.6 MiB≈468 KiB\approx 468\text{ KiB}≈468 KiBLatency: 0.7–1.0 s0.7\text{--}1.0\text{ s}0.7–1.0 s (Classify + Speak)

Technical Note on Memory: The SRAM figure is not additive. Because the VAD, STT, and neural TTS modules run sequentially, they share a single TensorFlow Lite Micro (TFLM) arena of ≈384 KiB\approx 384\text{ KiB}≈384 KiB. The total provisioned RAM is ≈468 KiB\approx 468\text{ KiB}≈468 KiB out of the 520 KiB520\text{ KiB}520 KiB available on the RP2350 (with ≈491 KiB\approx 491\text{ KiB}≈491 KiB used by wifi hardware).

Definitions:

  • MAC: Multiply-Accumulate operation.
  • MMAC/s: Millions of multiply-accumulates per second during active processing.

Implementation Details

The libraries for VAD, STT, and TTS are modular and can be used independently. All neural computations are powered by the TensorFlow Lite Micro library.

Repository Structure

The project is organized as follows:

moonshine/micro/
├── examples/           # RP2350 implementation demos
├── g2p/                # Grapheme-to-Phoneme logic
├── klatt-tts/          # TTS implementation
├── models/             # SpellingCNN and TinyVadCNN models
├── stt/                # Speech-to-Text core
├── vad/                # Voice Activity Detection core
└── third-party/        # External dependencies

Integration Checklist

  • Configure CMakeLists.txt
  • Import pico_sdk_import.cmake
  • Set up WiFi connection via the provided voice example
  • Deploy to RP2350 hardware

Licensing and Legal

The software is distributed under a permissive license to encourage commercial adoption.

  • Core Source Code: Licensed under the MIT License.
  • Models: The SpellingCNN and TinyVadCNN found in the models/ directory are also MIT Licensed.
  • External Code: Anything located in third-party/ is subject to the specific licenses of its original project (refer to the LICENSE file within each respective subfolder).

Documentation Links

For further details, refer to the following sections:

  1. Voice Activity Detection
  2. Speech to Text
  3. Custom Word Recognition
  4. Neural Text to Speech
  5. Wifi Setup Example