moonshine-voice
On-device speech recognition, intent matching, and text-to-speech
TLDR
SYNOPSIS
moonshine-voice command [options]moonshine-voice {mic | transcribe | tts | intent | download | g2p} [options]
DESCRIPTION
moonshine-voice is the command-line front end for Moonshine Voice, an open-source on-device toolkit for live speech interfaces. The same package ships a Python library and a portable C++ core; installing via pip registers moonshine-voice (and a shorter moonshine alias) as a thin dispatcher over the built-in demo modules.All processing can run fully offline after models are cached. Streaming STT models use flexible input windows and incremental caching so partial transcripts update while the user is still talking, targeting lower latency than fixed 30-second Whisper-style windows for live mic use. The stack also covers semantic intent matching, multi-engine TTS (Kokoro, Piper, and ZipVoice with optional voice cloning), and a MIT-licensed grapheme-to-phoneme (G2P) path used by synthesis.STT languages include English, Spanish, Mandarin, Japanese, Korean, Vietnamese, Ukrainian, and Arabic (language-specific models). TTS covers a wider set of locales via Kokoro/Piper/ZipVoice voice packs. The project also publishes microcontroller-oriented Moonshine Micro builds (VAD/STT/TTS under ~500 KiB RAM) separate from this CLI.
PARAMETERS
Common top-level options:-h, --help
Show usage and the list of subcommands.-V, --version
Print the installed moonshine-voice package version.Subcommand flags (most used):mic / intent: --language code (default en), --model-arch ntranscribe: --wav-path file, --language code, --model-path dir, --speaker-ids, --word-timestamps, --quiet, --options key=value,...tts: --language tag (default en_us), --text string, --voice id, --clone wav, --clone-transcript text, --out path, --device indexorname, --asset-root path, --options KEY=VALUEdownload: --stt, --tts, --g2p, --intent, --language tag, --voice id, --root dir (at least one of --stt / --tts / --g2p / --intent is required)g2p: -l / --language tag, --text string, --asset-root path, --no-downloadintent: --intents comma-list, --threshold float (default 0.8), --wav-file path, --embedding-model name, --quantization {fp32 | fp16 | q8 | q4 | q4f16}Each subcommand also accepts --help for its full flag list. Invoking python -m moonshine_voice.module with the same flags is equivalent.
COMMANDS
mic
Stream audio from the default microphone and print live transcript updates to the terminal.transcribe
Transcribe a WAV file offline. Supports speaker diarization (--speaker-ids) and word-level timestamps (--word-timestamps).tts
Synthesize speech from text to a WAV file or the default audio device. Optional ZipVoice cloning via --clone.intent
Listen for user-defined action phrases (comma-separated) and report semantic matches with confidence.download
Prefetch STT, TTS, G2P, or intent/embedding model assets into the local cache (or a custom --root).g2p
Convert input text to International Phonetic Alphabet (IPA) using Moonshine's G2P engine.
INSTALL
CAVEATS
First-run model downloads need network access to download.moonshine.ai (or Hugging Face mirrors used by the package); after that, inference can be offline if assets are cached. Live mic modes need a working capture device and appropriate OS audio permissions. On Raspberry Pi OS, installing system-wide often requires pip install --break-system-packages (or a virtualenv). --clone TTS uses ZipVoice and is slower than Kokoro/Piper. The moonshine short name is only an alias for the same entry point, not a separate tool.
HISTORY
Moonshine's first-generation models were released with the paper *Moonshine: Speech Recognition for Live Transcription and Voice Commands* (arXiv:2410.15608). Later work added language-specific "Flavors of Moonshine" models and a second generation aimed at streaming latency and edge accuracy, culminating in the Moonshine Voice multi-platform library and moonshine-voice pip package (Python console scripts plus C++/Swift/Android bindings). The project is developed by Moonshine AI under the MIT License.
SEE ALSO
whisper(1), faster-whisper(1), piper(1), tts(1), deepspeech(1)
