moonshine/micro at main · moonshine-ai/moonshine · GitHub
//files/disambiguate" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
//files/disambiguate;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading. Please reload this page.
moonshine-ai
moonshine
Public
Notifications<br>You must be signed in to change notification settings
Fork<br>475
Star<br>8.7k
FilesExpand file tree
main
/micro<br>Copy path
Directory actions
More options<br>More options
Directory actions
More options<br>More options
Latest commit
History<br>History<br>History
main
/micro<br>Copy path
Top
Folders and files<br>NameNameLast commit message<br>Last commit date<br>parent directory<br>..<br>cmake
cmake
examples/rp2350
examples/rp2350
feature-generation
feature-generation
g2p
g2p
images
images
klatt-tts
klatt-tts
models
models
neural-tts
neural-tts
stt-training
stt-training
stt
stt
test-support
test-support
third-party
third-party
vad
vad
CMakeLists.txt
CMakeLists.txt
LICENSE
LICENSE
README.md
README.md
pico_sdk_import.cmake
pico_sdk_import.cmake
video-thumbnail.gif
video-thumbnail.gif
View all files
README.md<br>Outline
Moonshine Micro — Voice Interfaces for Microcontrollers
Moonshine Voice is an open source AI toolkit for developers building real-time voice agents and applications. Moonshine Micro is a version designed specifically for embedded system processors like microcontrollers and DSPs, and uses the Raspberry Pi RP2350, which retails for just 80 cents, as its reference platform. It includes voice-activity detection, command recognition, and neural speech synthesis and can run in as little as 470 KB of RAM.
You can see a full walkthrough in the video below:
The memory and compute requirements are designed to fit resource-constrained<br>systems. Figures below are for the RP2350 demo; the<br>detailed memory budget breaks each one down:
Component<br>Flash<br>SRAM (arena peak)<br>Compute
VAD (Voice Activity Detection)<br>~89 KiB<br>~36 KiB<br>~0.8 MMAC/frame (~25 MMAC/s)
STT (SpellingCNN Speech-to-Text)<br>~1.3 MiB<br>~346 KiB<br>~36 MMAC/s
TTS (neural diphone synth @ 16 kHz)<br>~1.8 MiB voice pack<br>~340 KiB<br>~37 MMAC typical reply (~65 MMAC/s out)
TOTAL (Demo pipeline)<br>~3.6 MiB<br>~468 KiB provisioned*<br>classify + speak ~0.7–1.0 s
Notes:
Flash is .text + .rodata measured with arm-none-eabi-size on the default moonshine_micro_echo firmware (includes the embedded neural voice pack); SRAM is .bss + heap + stacks.
*VAD, STT, and neural TTS run sequentially and time-share one ~384 KiB TFLM arena, so SRAM is not additive — ~468 KiB is the total RAM provisioned on the 520 KiB RP2350 (wifi_hardware ~491 KiB).
A MAC is one multiply-accumulate; MMAC/s = millions per second during the active (non-idle) stage.
The code is released under the permissive MIT License, suitable for commercial applications.
There's a complete end-to-end example showing how to set up a wifi connection on a microcontroller using voice on an RP2350 MCU.
The VAD, STT, and TTS libraries can be used independently of each other, relying on the included TensorFlow Lite Micro library for the neural computations.
Documentation
Voice Activity Detection
Speech to Text
Custom Word Recognition
Neural Text to Speech
Wifi Setup Example
License
This code, apart from the source in third-party/, is licensed under the MIT<br>License — see LICENSE in this directory (also at the repository root).
The SpellingCNN and TinyVadCNN models in models/ are released under<br>the MIT License.
The code in third-party/ is licensed according to the terms of the open<br>source projects it originates from, with details in a LICENSE file in each<br>subfolder.
You can’t perform that action at this time.