Skip to content
WM KeyboardWM Keyboard
Accessibility

Offline voice (Moonshine)

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

Offline Moonshine is an English dictation engine that runs entirely on your phone, with Moonshine Tiny, 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. Moonshine’s models for Arabic, Chinese, Japanese, Korean, Spanish, Ukrainian and Vietnamese run on Offline Sherpa and are on its model list.

WM Keyboard  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.

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).

On a phone with a Snapdragon 8 Gen 2, 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 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 same chips also get Moonshine Base (NPU, 10 s), a 112 MB archive of Moonshine’s larger English model (61 million parameters to Tiny’s 27), which has no standard build here. With both downloaded, Base is used. It has no standard build to fall back on, so until the NPU library and runtime are on the phone it reports the model as not loading. The F-Droid build offers neither.

On a Dimensity or Snapdragon NPU, through ExecuTorch

Section titled “On a Dimensity or Snapdragon NPU, through ExecuTorch”

On a phone with a Dimensity 9300 or 9400, or one of the Snapdragons above, the list can also have Moonshine Tiny (NPU, ExecuTorch, 10 s): Moonshine Tiny’s encoder compiled for that chip’s NPU, run by ExecuTorch’s build with the NPU’s own delegate. The encoder is compiled for 10-second clips, padded and cut as above. The decoder, which writes the words one at a time, stays on the CPU: it is the standard build’s own file. So the download is the encoder for your chip from the project’s data repository, plus the standard build’s decoder and tokenizer (120 MB) from Hugging Face, each checked against its SHA-256.

It appears in the list once its files are published, and until then the list doesn’t show it. Downloading it also fetches ExecuTorch’s build with the NPU’s delegate (on a Snapdragon, also Qualcomm’s NPU runtime, after you accept Qualcomm’s licence on the GitHub edition). That build loads with the keyboard, so the first time it can take a restart of the keyboard; until then dictation uses the standard build if that is downloaded. Once it runs it is used over the standard build; on a Snapdragon with sherpa-onnx’s build on the phone too, sherpa-onnx’s is used. If it fails to load or to run, that phrase goes to the standard build, and the phone keeps using that until the system is updated or the NPU build is downloaded again. It has not been measured on a phone yet. The F-Droid build doesn’t offer it.

For English, Asr4All shows the words while you speak, and the whisper.cpp Whisper models 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.

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 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 Tiny and Base are Useful Sensors’ models, under the MIT licence; it is credited in the app’s About screen.