# Moonshine

> On-device speech recognition built for real-time, low-latency voice apps

- Category: Multimodal Generation / Audio, Music & Voice
- Language: Python
- Repository: https://github.com/moonshine-ai/moonshine
- Website: https://moonshine.ai
- Canonical page: https://ai-tldr.dev/tools/moonshine/

## In short

Moonshine Voice is an open-source toolkit for building real-time voice applications. Everything runs on the device itself, so there's no account, API key, or cloud round-trip needed, which keeps responses fast and audio private. It sits in the Audio, Music & Voice category of the Multimodal Generation tools and is open-source, written in Python.

## Overview

Moonshine Voice is an open-source toolkit for building real-time voice applications. Everything runs on the device itself, so there's no account, API key, or cloud round-trip needed, which keeps responses fast and audio private. The models are trained for live streaming, doing much of the recognition work while the user is still speaking.

It's aimed at developers who want speech-to-text, text-to-speech, speaker identification, command recognition, and conversational agents from a single library. The same toolkit runs across Python, iOS, Android, macOS, Linux, Windows, Raspberry Pi, and other small devices.

In the Speech & Audio category, Moonshine positions itself as an edge-friendly alternative to larger cloud models like Whisper. Its model sizes range from a 245M-parameter streaming model down to tiny 26MB models for constrained hardware, so it fits both desktops and small embedded boards.

## What it does

- Runs fully on-device with no account, credit card, or API key required
- Optimized for low-latency live streaming, processing speech while the user is still talking
- One library covers transcription, text-to-speech, speaker diarization, command recognition, and conversational agents
- Cross-platform: Python, iOS, Android, macOS, Linux, Windows, Raspberry Pi, and wearables
- Model sizes from a 245M-parameter streaming model down to 26MB models for constrained devices
- Multilingual STT and TTS, including English, Spanish, Mandarin, Japanese, Korean, and more

## Getting started

The fastest way to try Moonshine is the Python package, which can transcribe your microphone in real time. Example apps for iOS, Android, macOS, Windows, and Raspberry Pi are published on GitHub Releases.

1. Install the Python package

   Install Moonshine Voice from PyPI with pip.

```bash
pip install moonshine-voice
```

2. Transcribe your microphone

   Listen to the microphone and print updates to the transcript as they come in.

```bash
python -m moonshine_voice.mic_transcriber --language en
```

3. Recognize spoken commands

   Listen for user-defined action phrases like "Turn on the lights", using semantic matching so natural language variations are recognized.

```bash
python -m moonshine_voice.intent_recognizer
```

4. Synthesize speech (TTS)

   Convert text to speech and play it back.

```bash
python -m moonshine_voice.tts --language en_us --text "Hello world"
```

## When to use it

- Add real-time, private voice transcription to a desktop or mobile app without sending audio to the cloud
- Build offline voice command and intent recognition for smart-home or IoT devices
- Run speech-to-text on constrained hardware like a Raspberry Pi using small on-device models
- Create conversational voice agents that combine transcription, command handling, and text-to-speech in one library
