# Offline voice (Moonshine)

> Quick English dictation on your phone with Moonshine Tiny, a model made for short phrases.

URL: https://wmkeyboard.pages.dev/tools/moonshine/
Section: Tools

Offline Moonshine is an English dictation engine that runs entirely on your phone, with [Moonshine Tiny](https://github.com/moonshine-ai/moonshine), a 27-million-parameter model made for short phrases on small devices. Once the model is downloaded, no audio leaves the phone. While a layout in another language is in use, dictation uses the system recognizer instead.

## Setting it up

Voice typing

Add **Moonshine** to the **Recognition engine** list and move it to the top, then press its row to open its screen and download the model from the **Moonshine model** group there: 151 MB in three files, from Hugging Face at a fixed revision, each checked against its published SHA-256.

## How it works

Moonshine transcribes a phrase once you stop, and a phrase can run to 30 seconds. Where Whisper always pads what you said to a 30-second window, Moonshine reads only as much audio as there is, so a three-second phrase costs a three-second encode, which is what makes it quick on a phone. The text arrives punctuated and capitalised, then goes through the same spacing, spoken punctuation and undo as any other dictation (see [Voice typing](https://wmkeyboard.pages.dev/tools/voice/)).

## On a Snapdragon NPU

On a phone with a Snapdragon 8 Gen 3, 8 Elite or 8 Elite Gen 5, the model list also has **Moonshine Tiny (NPU, 10 s)**: the same model compiled for that chip's NPU by the [sherpa-onnx](https://github.com/k2-fsa/sherpa-onnx) project, one 58 MB archive from its GitHub releases, checked against its SHA-256. It is compiled for 10-second clips: a shorter phrase is padded to 10 seconds, and a longer one is cut at its quietest moments and transcribed piece by piece. Once downloaded it is used over the standard build. The first time, dictation also fetches sherpa-onnx's NPU library and the phone's NPU runtime; until both are there it uses the standard build if that is downloaded. It has not been measured on a phone yet. The F-Droid build does not offer it.

## Moonshine, Asr4All or Whisper

For English, [Asr4All](https://wmkeyboard.pages.dev/tools/asr4all/) shows the words while you speak, and the [whisper.cpp Whisper models](https://wmkeyboard.pages.dev/tools/whisper/) take your own words as hints and run to two minutes. Moonshine is the small, quick one: the least to download among them for its accuracy, and the fastest to answer a short phrase.

## Details & edge cases

**No words to listen for.** Moonshine has no way to take a list of names or terms, so **Words to listen for** does not show while it is the engine.

**Every build.** The runtime, [ExecuTorch](https://github.com/pytorch/executorch) built for the keyboard's models alone, is in every build; F-Droid compiles it from source. A build made without it does not offer the engine.

**The licence.** Moonshine is Useful Sensors' model, under the MIT licence; it is credited in the app's About screen.
